Paul Jr
07-24-2004, 02:07 PM
ARGH! mod_rewrite will be the death of me, I tell you.
I looked at about the first six results of this Google search (http://www.google.com/search?q=mod_rewrite&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8) and came up with the following as a test:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule /archive.php/(\d+)/(\d+)/(\d+) /archive.php?date=$1/$2/$3
</IfModule>
Guess what? Yup — it doesn’t work. I have tried many variations on that. I tried a simple redirect, and that worked, but I just can’t seem to get this working! :(
The basic idea is that someone types in http://www.url.com/archive.php/2004/06/16 and it’s the equivalent of them typing in http://www.url.com/archive.php?date=2004/06/16 It would be even better if I could get rid of the .php all together (http://www.url.com/archive/2004/06/16), but let’s not get ahead of ourselves.
I’m reading an article at Sitepoint, but nothing seems to be helping me.
I looked at about the first six results of this Google search (http://www.google.com/search?q=mod_rewrite&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8) and came up with the following as a test:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule /archive.php/(\d+)/(\d+)/(\d+) /archive.php?date=$1/$2/$3
</IfModule>
Guess what? Yup — it doesn’t work. I have tried many variations on that. I tried a simple redirect, and that worked, but I just can’t seem to get this working! :(
The basic idea is that someone types in http://www.url.com/archive.php/2004/06/16 and it’s the equivalent of them typing in http://www.url.com/archive.php?date=2004/06/16 It would be even better if I could get rid of the .php all together (http://www.url.com/archive/2004/06/16), but let’s not get ahead of ourselves.
I’m reading an article at Sitepoint, but nothing seems to be helping me.