steffen-wirth
5/2/2016 - 11:05 AM

remove trailing slash

remove trailing slash

############################################
## do not remove trailing slash for ajax methods
    #RewriteCond %{REQUEST_URI} !(ctwoajax|ajax|customer|checkout|newsletter/subscriber/new)
RewriteCond %{REQUEST_URI} !(ajax|checkout/onepage|customer|newsletter|checkout|admin|contacts|payone|paypal)

############################################
## remove trailing slash
#RewriteRule ^(.+[^/])/$ https://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
############################################