Skip to content

Instantly share code, notes, and snippets.

@evemilano
Created January 27, 2015 13:31
Show Gist options
  • Select an option

  • Save evemilano/9b5a41370fcec6d8b3d6 to your computer and use it in GitHub Desktop.

Select an option

Save evemilano/9b5a41370fcec6d8b3d6 to your computer and use it in GitHub Desktop.
Rimuovere index e slash dall'URL
Options +FollowSymLinks -MultiViews -indexes
RewriteEngine On
RewriteBase /
#Rimuovere index
RewriteRule (.*)/index$ $1/ [R=302]
#Rimuovere lo slash / se non è una directory
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*)/ $1 [R=301,L]
@evemilano
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment