Skip to content

Instantly share code, notes, and snippets.

@timkelty
Created July 23, 2010 15:11
Show Gist options
  • Select an option

  • Save timkelty/487556 to your computer and use it in GitHub Desktop.

Select an option

Save timkelty/487556 to your computer and use it in GitHub Desktop.
# Add a trailing slash to paths without an extension
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule ^(.*)$ $1/ [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment