Answer the question
In order to leave comments, you need to log in
How to fix htaccess to merge 2 redirects into 1?
RewriteCond %{THE_REQUEST} /(.*)index.php.*$
RewriteRule .* /%1 [R=301,L]
RewriteCond %{REQUEST_URI} ^(.*/[^/\.]+)$
RewriteRule ^ (.*)$ https://%{HTTP_HOST}/$1/ [R=301,L]
RewriteCond %{QUERY_STRING} ^oid=(.*)
RewriteRule ^(.*)$ /$1? [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS } !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_URI} /[^/.]+$
RewriteRule ^(.*)$ https://localhost/$1/ [R=301,L]
RewriteCond %{THE_REQUEST} /index\.php [OR]
RewriteCond %{HTTPS} !on [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*?)(index\.php|$) https://localhost/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question