Skip to content

Navigation Menu

Sign up

Fix double slash in url #1902

Unanswered
Dmi3yy asked this question in Q&A
Discussion options

For .htaccess

RewriteCond %{THE_REQUEST} ([^\s]*)\/{2,}(\?[^\s]*)?
RewriteRule . %1/%2 [R,L]

For Nginx

if ($request_uri ~* "\/\/") {
 rewrite ^/(.*) $scheme://$server_name/ permanent;
}
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /