Danny620 Posted May 19, 2012 Share Posted May 19, 2012 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> Quote Link to comment https://forums.phpfreaks.com/topic/262776-mod_rewrite-remove-trailing-slash-apache/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.