views:

32

answers:

1

Hey everyone, I'm having rewite issues.

http://test.bradp.com/drupal/Crocodile-Style/1 works OK.

http://test.bradp.com/drupal/Crocodile-Style/ DOES NOT WORK.

Apache throws a 404. The PHP logic defaults to page 1 without a page specified, so I know the script is fine.

Here's the code: RewriteRule ^Crocodile-Style/([0-9]+)/?$ products/display.php?folder=crocodile-style&page=$1 [L,NC]

What can I do?

Thanks Nick

+1  A: 

You're using the + modfier (1 or more) instead of the * modifier (0 or more).

Instead, you should use:

RewriteRule ^Crocodile-Style/([0-9]*)/?$ products/display.php?folder=crocodile-style&page=$1 [L,NC]
MiffTheFox
Thanks for the answer. I ended up using two rules because it wouldn't work without the trailing slash.
Castgame