Forum Moderators: phranque
I want: http://www.example.com/dir directed to http://example.com/dir.
The dir is the part I'm really going after here in this instance.
I know it's something like this, but I don't want all the www sites to be redirected, only the one with the /dir.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
How do I go about doing this?
Thanks.
[edited by: jdMorgan at 6:39 pm (utc) on Oct. 27, 2005]
[edit reason] Examplified. [/edit]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^[b]dir/[/b](.*)$ http://example.com/[b]dir/[/b]$1 [R=301,L]
Jim