[solved] mod_rewrite rules stopped working
Posted: Tue Jun 18, 2013 5:57 pm
I've just build a Debian box and migrated an app from an older SuSe box. This app has a large-ish .htaccess file with a bunch of mod_rewrite rules. All of these rules work perfectly fine on SuSe, but some of them don't on Debian. The file looks like this:
I've moved some of the no-longer-working rules to the top, above the rules that do work, with no change - so it doesn't appear the working rules are breaking the rest.
Any ideas?
Edit Strange - some .htaccess files are working, others are not. As far as I can tell they're pretty much exactly the same.
Code: Select all
RewriteEngine on
# These three rules work
RewriteRule ^month/([0-9]*)/([0-9]*)/(.*)/(.*)/ schedule.month.php?month=$1&year=$2&category=$3&location=$4 [L]
RewriteRule ^week/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)/(.*)/$ schedule.week.php?year=$1&month=$2&day=$3&category=$4&location=$5 [L]
RewriteRule ^day/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)/(.*)/$ schedule.day.php?year=$1&month=$2&day=$3&category=$4&location=$5 [L]
# The rest don't
RewriteRule ^ical/(.*)/(.*)/ ical.php?category=$1&location=$2 [L]
RewriteRule ^mine$ /eventus/mine/event/asc/ [R] # requested: /eventus/mine
RewriteRule ^mine/$ /eventus/mine/event/asc/ [R] # requested: /eventus/mine/
RewriteRule ^mine/([^/]*)$ /eventus/mine/$1/asc/ [R] # requested: /eventus/mine/blah
RewriteRule ^mine/([^/]*)/$ /eventus/mine/$1/asc/ [R] # requested: /eventus/mine/blah/
RewriteRule ^mine/([^/]*)/([^/]*)$ /eventus/mine/$1/$2/ [R] # requested: /eventus/mine/blah/blah
RewriteRule ^mine/(.*)/(.*)/$ mine.php?sort=$1&direction=$2
RewriteRule ^new/$ new.php [L]
RewriteRule ^edit/([^/]*)/$ edit.php?id=$1 [L]
RewriteRule ^approve/(.+)$ approve.php?code=$1 [L]
RewriteRule ^approve/$ approve.php [L]
RewriteRule ^todo/ todo.php [L]
RewriteRule ^import/$ import.php
Any ideas?
Edit Strange - some .htaccess files are working, others are not. As far as I can tell they're pretty much exactly the same.