0

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?

1 Answer 1

1

Have a look at the Redirect and RedirectMatch directives.

2
  • 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, 2012 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. Jan 30, 2012 at 22:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .