rich w
October 17th, 2007, 00:13
Greetings all!
I'm having a few problems with mod_rewrite at the moment. Surprise! :lol:
Basically, i've got the following set of rules running on Apache 2 on my development server. However, when I upload to the Apache 1.x live environment, I get this error:
/home/studento/public_html/.htaccess: RewriteRule: cannot compile regular expression '^cache/users/rand([a-zA-Z0-9-.]+)_([0-9]+)_([0-9]+).jpg$'\n
RewriteEngine on
RewriteRule ^cache/users/rand([a-zA-Z0-9-.]+)_([0-9]+)_([0-9]+).jpg$ cache/users/$2_$3.jpg [NC]
RewriteRule ^friends/$ friends/index.php [NC]
RewriteRule ^friends/([0-9]+)/$ friends/view.php?id=$1 [NC]
RewriteRule ^friends/([0-9]+)$ friends/view.php?id=$1 [NC]
RewriteRule ^news/([a-zA-Z0-9-]+)/$ news/index.php?z=$1 [NC]
RewriteRule ^news/([a-zA-Z0-9-]+)/([0-9]+)/$ news/index.php?z=$1&id=$2 [NC]
RewriteRule ^zones/([a-zA-Z0-9-]+)/$ zones/index.php?z=$1 [NC]
RewriteRule ^zones/([a-zA-Z0-9-]+)/things/$ things/index.php?z=$1 [NC]
RewriteRule ^zones/([a-zA-Z0-9-]+)/things/([a-zA-Z0-9-_]+)/$ things/thing.php?z=$1&t=$2 [NC]
RewriteRule ^zones/([a-zA-Z0-9-]+)/things/([a-zA-Z0-9-_]+)/discussion/$ things/discussion_newtopic.php?z=$1&t=$2 [NC]
RewriteRule ^zones/([a-zA-Z0-9-]+)/things/([a-zA-Z0-9-_]+)/discussion/([a-zA-Z0-9-]+)/$ things/discussion.php?z=$1&t=$2&top=$3 [NC]
Any thoughts, solutions etc would be appreciated :)
I'm having a few problems with mod_rewrite at the moment. Surprise! :lol:
Basically, i've got the following set of rules running on Apache 2 on my development server. However, when I upload to the Apache 1.x live environment, I get this error:
/home/studento/public_html/.htaccess: RewriteRule: cannot compile regular expression '^cache/users/rand([a-zA-Z0-9-.]+)_([0-9]+)_([0-9]+).jpg$'\n
RewriteEngine on
RewriteRule ^cache/users/rand([a-zA-Z0-9-.]+)_([0-9]+)_([0-9]+).jpg$ cache/users/$2_$3.jpg [NC]
RewriteRule ^friends/$ friends/index.php [NC]
RewriteRule ^friends/([0-9]+)/$ friends/view.php?id=$1 [NC]
RewriteRule ^friends/([0-9]+)$ friends/view.php?id=$1 [NC]
RewriteRule ^news/([a-zA-Z0-9-]+)/$ news/index.php?z=$1 [NC]
RewriteRule ^news/([a-zA-Z0-9-]+)/([0-9]+)/$ news/index.php?z=$1&id=$2 [NC]
RewriteRule ^zones/([a-zA-Z0-9-]+)/$ zones/index.php?z=$1 [NC]
RewriteRule ^zones/([a-zA-Z0-9-]+)/things/$ things/index.php?z=$1 [NC]
RewriteRule ^zones/([a-zA-Z0-9-]+)/things/([a-zA-Z0-9-_]+)/$ things/thing.php?z=$1&t=$2 [NC]
RewriteRule ^zones/([a-zA-Z0-9-]+)/things/([a-zA-Z0-9-_]+)/discussion/$ things/discussion_newtopic.php?z=$1&t=$2 [NC]
RewriteRule ^zones/([a-zA-Z0-9-]+)/things/([a-zA-Z0-9-_]+)/discussion/([a-zA-Z0-9-]+)/$ things/discussion.php?z=$1&t=$2&top=$3 [NC]
Any thoughts, solutions etc would be appreciated :)