Forum Moderators: phranque

Message Too Old, No Replies

Mod_Rewrite Folders

Why a 404?

         

xcandyman

3:55 pm on Aug 21, 2003 (gmt 0)

10+ Year Member



Hi All

I created a rule:

RewriteRule ^([0-9]+)/([0-9]+) /index.php?year=$1&month=$2 [L]

but I get a 404

But if I use:

RewriteRule ^([0-9]+)/([0-9]+).html /index.php?year=$1&month=$2 [L]

That works. Why? How do I get the folder version to work?

Thanks

jdMorgan

5:30 pm on Aug 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



xcandyman,

Try adding a trailing slash to the pattern:


RewriteRule ^([0-9]+)/([0-9]+)/ /index.php?year=$1&month=$2 [L]

If you actually have .html pages in that folder, then you'll need to use your original rule as well, or combine them using " (/¦\.html) " to match slash or .html.

As usual, replace the broken vertical pipe "¦" character with the solid one from your keyboard.

Jim