I have Apache 2.0 set up with a virtual host like this:
<VirtualHost *:80>
ServerName wackystore
ServerAlias wackyprojects
Alias /media/admin /opt/python/lib/python2.7/site-packages/django/contrib/$
Alias /media /opt/DjangoProjects/wacky/media
#mod_wsgi setup
WSGIScriptAlias / /opt/DjangoProjects/wacky/django.wsgi
</VirtualHost>
I have our DNS set up so both "wackystore" and "wackyprojects" go to this server.
What I want to have happen is for mod rewrite to change the url for wackyprojects to wackprojects/tools.
Examples:
http://wackystore -> no change
http://wackystore/something -> no change
http://wackyprojects/ -> http://wackyprojects/tools
http://wackyprojects -> http://wackyprojects/tools
http://wackyprojects/something -> no change
Something like this should work:
"If the HTTP_HOST is
wackyprojects
and the REQUEST_URI is/
or nothing at all, then rewrite the request tohttp://wackyprojects/tools
and stop there."Try this:
NC
flag means no caseL
- Last rule andR
- force redirect