Forum Moderators: phranque
RewriteEngine on
RewriteBase /
RewriteRule ^section1$ /section1/ [R]
RewriteRule ^section2$ /section2/ [R]
...
RewriteRule ^section20$ /section20/ [R]
I would like to know how not to have to specify each one like this. What would be even better would be if I could take ANY request which does not have a dot in it and make sure it has a trailing slash.
Trust me, I'm a doctor.
Catweasel
[edited by: jdMorgan at 12:58 pm (utc) on Mar. 21, 2004]
[edit reason] Removed URL sig per TOS [/edit]
To answer your question:
RewriteRule ^section([0-9]+)$ /section$1/ [R]
;)
Welcome to WebmasterWorld [webmasterworld.com]!
Apache mod_dir (if loaded) should automatically fix trailing slash problems, so make sure you haven't by-passed it somehow.
If you do need a mod_rewrite solution, see msg #5 in the thread at [webmasterworld.com...]
Jim