Skip to content

Instantly share code, notes, and snippets.

@tur-nr
Last active December 11, 2015 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tur-nr/4541740 to your computer and use it in GitHub Desktop.
Save tur-nr/4541740 to your computer and use it in GitHub Desktop.
Adds a trailing slash to a request.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\..+)$
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ $1/ [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment