-4

I already have a redirect to the main page of the site:

RewriteEngine On
RewriteRule ^$ index.php [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]

But if you type domain.com, then the redirection will be to example.com/index.php But I need to redirect immediately to https://example.com/index.php

fosh4455
  • 361
  • 1
  • 4
  • 11

1 Answers1

1

Use this htaccess code

RewriteEngine On
RewriteRule ^$ index.php [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Shubham Azad
  • 786
  • 2
  • 10
  • 25