views:

43

answers:

1

Hello All,

I have a rewrite rule set up in my .htaccess file:

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

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.

What can I do?

Thanks Nick

+1  A: 

It's probably easiest to implement this with two rules:

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