Multiple redirects with one domain on Apache
Posted
by
hfranco
on Server Fault
See other posts from Server Fault
or by hfranco
Published on 2012-09-18T19:21:31Z
Indexed on
2012/09/18
21:41 UTC
Read the original article
Hit count: 205
I'm trying to figure out how to redirect one URL to one location:
http://mydomain.com/admin to http://mydomain.com/admin
And have all other requests from
http://mydomain.com point to http://myotherdomain.com
So essentially all other requests will redirect to myotherdomain.com except for http://mydomain.com/admin
I've tried setting up a Redirect rule in Apache but I'm not having any luck. I get a "The page isn't redirecting properly" message.
<VirtualHost *:80>
ServerName mydomain.com
ServerAlias www.mydomain.com
DocumentRoot /opt/www/mydomain.com/
Redirect /admin http://mydomain.com/admin
Redirect / http://www.myotherdomain.com
</VirtualHost>
© Server Fault or respective owner