I have the following URL which displays a normal static website: www.example.com. This site is hoted on Amazon.

I want to make all urls starting with www.example.com/redirect to redirect to another hosting account that I have. Note that I also want the host to be at the above domain (i.e., it is not a re-direct to another url here).

If this account is located at 1.23.345.678. What do I need to change in the .htaccess file in order to do this redirect?

link|improve this question

62% accept rate
feedback

1 Answer

up vote 1 down vote accepted

Have a look at the Redirect and RedirectMatch directives.

link|improve this answer
Thanks. So, if I understand correctly, Redirect /redirect 1.23.345.678. How would this actually look in the .htaccess file, with tags and all? – David542 Jan 30 at 22:52
1  
Almost exactly as you've just done it, except it needs to be a URL - so http://x.x.x.x/ - not just the IP. If it doesn't work right away, you might need to tweak AllowOverride in the Apache config. – James O'Gorman Jan 30 at 22:53
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.