Jump to content

mod_rewrite: remove trailing slash apache


Danny620

Recommended Posts

I have a url like http://www.mysite.com/myurl/

 

however how can remove trailing slash apache so it looks like

 

http://www.mysite.com/myurl

 

ive got this code

 

<IfModule mod_rewrite.c>
   Options +FollowSymLinks
   Options +Indexes
   RewriteEngine On
   RewriteRule ^article/([^/\.]+)/?$ blog.php?article_url=$1
   RewriteCond %{SCRIPT_FILENAME} !-d
   RewriteRule ^([^\.]+)/$ $1.php [NC,L]
</IfModule>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.