Monday, March 29, 2010

Simple Apache Rewrite: Add a folder to subdomain's root

Make sure you have activated the rewrite module. For example: Add the module to the APACHE_MODULES in /etc/sysconfig/apache2.

To redirect all http://mysub.mosbase.com/ to http://mysub.mosbase.com/start/ add this to your configuration (e.g., in your vhost declaration):

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysub\.mosbase\.com$
RewriteRule ^/$ /start/ [PT,L]

No comments:

Post a Comment

And Feedback? Please post a comment: