Hello, I have that in my htaccess: RewriteEngine on RewriteCond %{HTTP_HOST} ^mysite.tld RewriteRule (.*) http://www.mysite.tld/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^mysite.tld/forum RewriteRule (.*) http://www.mysite.tld/forum/$1 [R=301,L] Code (markup): The first is working find but when I go to mysite.tld/forum it redirects me to www.mysite.tld, where is the fault ? Thanks
I want to do thta: when I go to mysite.tld/directory then I want to be redirected to www.mysite.tld/directory
Try putting this line first: RewriteCond %{HTTP_HOST} ^mysite.tld/forum RewriteRule (.*) http://www.mysite.tld/forum/$1 [R=301,L] The "L" in [R=301,L] means that that rule is the last one that'll be done on the URL that meets the condition.