Forum Moderators: phranque
I've got my Mod_rewrite set up working really well band all the URLs in my site are in the form
www.mysite.com/news/2004/03/
and
www.mysite.com/about/team/membername/
etc.
The problem I'm having is that if there is no trailing slash present a 404 error is generated, which isn't the best situation at all
Because the site pretty large in size here's about a dozen or so rewrites going on.
I'm using the following rules:
RewriteRule ^news/(.*)/(.*)/ /news/archive.php?Y_ID=$1&M_ID=$2
and
RewriteRule ^about/team/(.*)/ /about/team/member.php?Name_Str=$1
and I've tried using the following rules to get the server to redirect the pages with out slashes to ones with slashes
e.g.
RewriteRule ^about/team/(.*) /about/team/$1/ [R]
RewriteRule ^about/team/(.*)/ /about/team/member.php?Name_Str=$1
And I'm just getting an infinite loop, I've tried the redirection both before and after the orginal rule and still no joy.
Anyone got any ideas on how I could solve this? without having to remove the slash idea entirely?
Any help would be greatly appreciated
Thanks
Colm
Welcome to WebmasterWorld!
Question mark should follow slash...
RewriteRule ^news/([^/]+)/([^/]*)/? /news/archive.php?Y_ID=$1&M_ID=$2
RewriteRule ^about/team/([^/]*)/? /about/team/member.php?Name_Str=$1
Jim