I want to reqwrite a URL http://www.mysite.com/this/index.php
to http://www.mysite.com
I knwo it’s a bit complex..it tried this code on my root htaccess but it doesn’t seem to work
What am i doing wrong here?
RewriteCond %{HTTP_HOST} ^mysite\.us$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mysite\.us$
RewriteRule ^/this/index.php$ /
erm, you wish to check against
mysite.usand have usedmysite.comin rewrite rule, Ignoring that fact, here is the result I think will work for you:Basically, I just removed the
/character from^/thisbecause that’s how links are matched.And the
[R]means r edirect which means it changes the url in your browser. Otherwise you don’t see the url is changed, you only see the page is changed.Here’s the screenshot from htaccess.madewithlove.be.