htaccess in one of my site but getting funny error when i try to open site with http://www.online4movies.com/ it dont work, if i don’t use http://online4movies.com/ it work
here is the code
<ifmodule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.online4movies.com
RewriteRule (.*) http://www.online4movies.com/$1 [R=301,L]
RewriteCond %{request_filename} -f
RewriteRule ^(.*) $1 [L]
RewriteRule ^([a-z]+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L]
</ifmodule>
There are a couple of things wrong with the above rules, but the one that is really causing you a problem is that you forgot a
!in front of the right operand of the firstRewriteCond.Other things that are wrong include:
.must be escaped to have their literal meaning in a regular expression, which is what the second argument toRewriteCondis.(.*)would be much safer if you included^$request_filenameshould be capitalised-as the second argument to theRewriteRuleinstead. But there is no need for that rule, simply negate theRewriteCondand apply it to the next rule.Try this file instead: