Permalink
Browse files

removed trailing slash redirects in htacess

a wiki page is created for people who want to use it: https://github.com/paulirish/html5-boilerplate/wiki/Proper-usage-of-trailing-slash-redirects
it is also under the Make it better section of the wiki https://github.com/paulirish/html5-boilerplate/wiki/Make-it-better
this has been discussed at many issues/tickets/mailinglist posts #493 #515
  • Loading branch information...
1 parent d5d05a3 commit b37d518d81a8cd21c2e7e55d160fccef50a8b178 @shichuan shichuan committed Jun 23, 2011
Showing with 0 additions and 35 deletions.
  1. +0 −35 .htaccess
View
@@ -337,41 +337,6 @@ FileETag None
# ----------------------------------------------------------------------
-# Add/remove trailing slash to (non-file) URLs
-# ----------------------------------------------------------------------
-
-# Google treats URLs with and without trailing slashes separately.
-# Forcing a trailing slash is usually preferred, but all that's really
-# important is that one correctly redirects to the other.
-
-# By default option 1 (force trailing slash) is activated.
-# http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html
-# http://www.alistapart.com/articles/slashforward/
-# http://httpd.apache.org/docs/2.0/misc/rewriteguide.html#url Trailing Slash Problem
-
-# ----------------------------------------------------------------------
-
-# Option 1:
-# Rewrite "domain.com/foo -> domain.com/foo/"
-
-<IfModule mod_rewrite.c>
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
- RewriteRule ^(.*)$ $1/ [R=301,L]
-</IfModule>
-
-# ----------------------------------------------------------------------
-
-# Option 2:
-# Rewrite "domain.com/foo/ -> domain.com/foo"
-
-#<IfModule mod_rewrite.c>
-# RewriteRule ^(.*)/$ $1 [R=301,L]
-#</IfModule>
-
-
-
-# ----------------------------------------------------------------------
# Built-in filename-based cache busting
# ----------------------------------------------------------------------

0 comments on commit b37d518

Please sign in to comment.