+ 1
.htaccess - How to disable (?code=$1)
I'm trying to make a domain automatically https, but when I do that the url changes itself from: /index to /index.php?code=$1 ($ 1 is the code name) How can i fix this? Please let me know! EXAMPLE CODE (.htaccess): RewriteEngine On RewriteRule ^([A-Za-z0-9]+)$ redirect.php?code=$1 RewriteCond %{ENV:HTTPS} !on [OR] RewriteCond %{HTTP_HOST} !^example.com$ [NC] RewriteRule ^(.*)$ https://example.com/$1 [L,R=301]
2 odpowiedzi
0
This code should force everything to load https.
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
0
Thanks, but that's not the question :p