Redirect www.example.com/apple to food.example.com/fruits/apple
- by Senthil
I want to redirect users from
www.example.com/apple
to
http://food.example.com/fruits/apple
Note:
This is a hardcoded redirection. Even a mapping if you will. "apple" will not be substituted with anything else. Nothing in the two URLs will change except for the domain of course. So there is no need for a regular expression to match the "apple" or anything else.
There is already dozens of RewriteCond and RewriteRule things in the .htaccess file. I do not want them to be affected. This redirection is independent of those.
I have access to the .htaccess file at the root of www.example.com and the httpd.conf
What code should I put in .htaccess in order to achieve this? Or should I change the httpd.conf?