Jump to content
xisto Community
Sign in to follow this  
Tropicality

.htaccess Redirecting Woes

Recommended Posts

I am having a hard time figuring this one out! I am a noobie webmasta!

What I want to do is this:

have http://www.example.com/ redirect to http://ex.com/325264222

Which I was able to do by putting "Redirect 301 / http://ex.com/325264222 " into an htaccess file in the root directory.

BUT now what I want to do is have it so that I can bypass it by using http://forums.xisto.com/no_longer_exists/ and NOT have it redirect me (which it still does) but have it still redirect if I go to http://www.example.com/

Can someone please tell me what I need to do here?

Thanks!!

Share this post


Link to post
Share on other sites

Why not use the code say:

Redirect /index.html [url=http://ex.com/325264222]http://ex.com/325264222[/url]

Because by using / you say to your htaccess to redirect the whole domain.. therefore, you could use another htaccess file in your blog directory which wouldn't have redirection, but don't know how that would work. :P

Also you could do it using PHP, bu creating a index.php and sending a redirect header, or if you don't like php, when you can create a index.html file and redirect using meta tag or javascript, but using javascript in my opinion is stupid.
Edited by Quatrux (see edit history)

Share this post


Link to post
Share on other sites

Quatrux is referring to this php redirct.

<?phpheader("Location: http://forums.xisto.com/no_longer_exists/;'>http://forums.xisto.com/no_longer_exists/;

For the htaccess you would set it up like so:
redirect /~youraccount/index.html http://forums.xisto.com/no_longer_exists/

As you can see you would need to list the whole directory for this to work and that should help you out a little bit.

Share this post


Link to post
Share on other sites

Sorry but I am still lost. You will need to point out which htaccess files i need to edit and how and I might as well give you the links im using so I don't get further confused >.<

So where it starts is http://forums.xisto.com/no_longer_exists/ and I want it to redirect to http://forums.xisto.com/no_longer_exists/

But I want to also be able to set up a blog at http://forums.xisto.com/no_longer_exists/ and not have it redirect me to http://forums.xisto.com/no_longer_exists/ like it does right now if you type in the above url (/blog/)


Thanks!

Edited by Tropicality (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.