We Recommend

Pro Apache Pro Apache
In addition to installation, maintenance, and deployment, the book demonstrates how to configure Apache to use Perl, PHP, and Python as server-side scripting languages. And unlike other books on Apache, Pro Apache provides comprehensive information on both major revisions - 1.3 and 2.0 - of the software.


Ballyhoo


Posted By

cyrilbatillat on 05/05/08


Tagged

url apache slash


Versions (?)


Remove trailing slash from url


Published in: Apache 


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

  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]

Report this snippet 

You need to login to post a comment.