I looked at the related mod_rewrite qustions, but I can’t do anything specific, so I will post:
Here is my rule that adds a trailing slash:
RewriteCond %{REQUEST_URI} ^/[^\.]+[^/]$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L]
Only I want to exclude one specific directory, for example. / mydirectoryname / and don't add a trailing slash to anything that starts with this. The reason is because it breaks some of my ajax calls.
source
share