"archives" works but "archive" doesn't

Oh, the strange things mod_rewrite does!

"archives" works but "archive" doesn't

Postby johtib » Fri Aug 05, 2005 5:53 am

Code: Select all
RewriteEngine On
RewriteRule ^archives/([0-9]+)/([0-9]+)\.html archive.php?year=$1&month=$2
RewriteRule ^items/([0-9]+)\.html item.php?id=$1

If I change the first rule to use ^archive instead och ^archives I get redirected to the correct page but the query string is empty (i.e. year and month don't get passed). With ^archives everything Just Works (tm).

I don't have any file or directory named archive or anything similar except for the archive.php i redirect to.

EDIT. WTF!?! If I remove all rules /archive/ still redirects to archive.php, a PHP or Apache "feature"?
Posts: 1
Joined: Fri Aug 05, 2005 5:48 am

Return to Idiosyncrasies

Who is online

Users browsing this forum: No registered users and 1 guest