how do I improve my simple mod_rewrite in htaccess?
I am using mo开发者_JS百科d_rewrite for clean urls but I'm just having a small problem.
The line in particular is:
RewriteRule ^events/(.*)$ fe_events.php?event_url=$1
This works. I can go to url.com/events/something_or_other and it works as expected. The problem however is then if I just go to url.com/events it doesn't work - I've got to go to url.com/events/ (with a trailing forward slash on the end).
Can I simply modify this line or do I need to add another line such as:
RewriteRule ^events$ fe_events.php
Thanks for your time!
RewriteRule ^events(/(.*))?$ e_events.php?event_url=$1
this should work.
精彩评论