regex - apache htacess remove trailing slash for multiple domains and protocols -


I have the same file that handles certain domains and some protocols (both http and https).

I try to find a way to redirect all trafficking to a page with a slash and multiple domains without following this slash.

Is it that I can do it in a statement for all my domains and protocols? I use more than 50 domains and it is a pain to declare all http and https for those domains.

Iv tried:

  RewriteRule ^ (. *) / $ / $ 1  

but with sub directories It does not seem to work, so I can not understand that it creates an interval loop

Use this rule instead of removing indexed slashes from any path:

  rewrite it!% {REQUEST_FILENAME}! -d Recovery code% {THE_REQUEST} \ s (. +?) / + [? \ S] RewriteRule ^ (. +?) / $ / $ 1 [R = 301, L]  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -