ppeter
Aug 4th, 2004, 10:11 AM
Hi Guys,
I have the following in my .htaccess:
RewriteEngine on
RewriteRule ^/?$ template.php?section=home&page=home [L]
RewriteRule ^index.php?$ template.php?section=home&page=home [L]
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ template.php?section=$1&page=$2 [L]
The first two RewriteRules work fine, but the last one... current will match something like ..com/section/page/ whereas I want it to match ..com/section/page.php
I've tried fiddling with it, but no luck. I'm very new to mod_rewrite.
Thanks, Phil
I have the following in my .htaccess:
RewriteEngine on
RewriteRule ^/?$ template.php?section=home&page=home [L]
RewriteRule ^index.php?$ template.php?section=home&page=home [L]
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ template.php?section=$1&page=$2 [L]
The first two RewriteRules work fine, but the last one... current will match something like ..com/section/page/ whereas I want it to match ..com/section/page.php
I've tried fiddling with it, but no luck. I'm very new to mod_rewrite.
Thanks, Phil