Skip to content

Instantly share code, notes, and snippets.

@intsdev
Last active May 16, 2020 13:55
Show Gist options
  • Save intsdev/a17e1698fb0333fa086e6dee8dfa00d3 to your computer and use it in GitHub Desktop.
Save intsdev/a17e1698fb0333fa086e6dee8dfa00d3 to your computer and use it in GitHub Desktop.
Remove trailing slash (redirect to remove trailing slash) in .htaccess
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ https://%{HTTP_HOST}/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment