0

I am creating following code in .htacess but http req can not goes to https plz need change in code If i am uses last three line then internal links can not open. Which is mistake is occur in my code?

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ {request_url}/$1 [R,L]
  • 1
    Does this answer your question? [How to redirect all HTTP requests to HTTPS](https://stackoverflow.com/questions/4083221/how-to-redirect-all-http-requests-to-https) – cabrerahector Feb 23 '21 at 12:59

1 Answers1

0

Try this

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
rajat.gite
  • 450
  • 2
  • 10