regex - Mod_rewrite works on local, not on remote, version? -
i have site. let's call htp://www.mysite.com
i have rewrite rule change htp://www.mysite.com/?q=words%20etc/0/10
http://www.mysite.com/words%20etc/0/10
(or http://www.mysite.com//0/10
or http://www.mysite.com/0/10
)
.htaccess:errordocument 404 htp://www.mysite.com/404.html options +followsymlinks rewriteengine on rewritecond %{request_uri} !-f rewritecond %{request_uri} !-d rewritecond %{request_uri} !index\.php rewriterule ^/?([^/]+?)?/?([0-9]+?)/([0-9]+?)$ index.php/%{the_request} [nc]
now, works on local apache 2.2.11 server, no errors. on host's apache 1.3.41 server, following error:
[sat mar 5 21:42:14 2011] [alert] [client [ip]] /home/_/public_html/mysite.com/.htaccess: rewriterule: cannot compile regular expression '^/?([^/]+?)?/?([0-9]+?)/([0-9]+?)$'\n
i imagine it's quirky apache version other sites on host use mod_rewrite without hitch.
i've tried removing +followsymlinks
line, rewrite engine line. haven't tried removing conditions cause don't think should have to, i'm wrong.
answer here: http://www.webmasterworld.com/apache/4277342.htm
i'm using ? wrong mostly. post solution when works.
errordocument 404 /404.html options +followsymlinks rewriteengine on rewritecond %{request_uri} !-f rewritecond %{request_uri} !-d rewritecond %{request_uri} !/index\.php rewriterule ^/?([^/]+)/([0-9]+)/([0-9]+)$ index.php?q=$1&s=$2&p=$3 [nc] rewriterule ^/?([0-9]+)/([0-9]+)$ index.php?q=&s=$1&p=$2 [nc]
fixeddddd.
Comments
Post a Comment