Results 1 to 1 of 1
Thread: htaccess - mod_rewrite question
-
10-25-2006, 06:58 AM #1Web Hosting Master
- Join Date
- Dec 2001
- Posts
- 1,372
htaccess - mod_rewrite question
I am using this to re-write any attempt to go to www. It works just fine.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.mysite\.net$ [NC]
RewriteRule ^(.*)$ http://mysite.net$1 [R=301,L]
HOWEVER:
I have sub directories like:
http://mysite.net/sub-dir1/
http://mysite.net/sub-dir2/
http://mysite.net/sub-dir3/
The above rewrite does not include these subdirectories so I can easily go to http://www.mysite.net/sub-dir2/ with the WWW which I don't want to.
How can I change the above rewrite to include the sub directories as well?
Thanks.