Remove trailing slash from url


/ Published in: Apache
Save to your folder(s)



Copy this code and paste it in your HTML
  1. RewriteCond %{HTTP_HOST} ^your-domain.com$ [NC]
  2. RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]
  3.  
  4. or, if you have 'www' part in your domain name, add this instead:
  5.  
  6. RewriteCond %{HTTP_HOST} ^(www.)?your-domain\.com$ [NC]
  7. RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

URL: http://www.learndrupalcms.com/basic-drupal-site-configuration

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.