Hide File Extensions : mod_rewrite tutorial
i found some code that turns
sitename.com/page-name.php
into:
sitename.com/page-name
The code is this:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]
</IfModule>
Can anyone tell me to modifiy it so that there is a trailing slash, so it would be:
sitename.com/page-name/
Hope that makes sense, im sure its a matter of sticking in a "/" somewhere, im just not sure where.
Thanks,
- Andy













LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks