Answer the question
In order to leave comments, you need to log in
Redirect from index.php and index.html to normal page?
I'm trying to add a redirect from the index to the regular one, but now when I go to the index, it says Page is not available, advise how to fix it?
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{THE_REQUEST} //
RewriteRule .* /$0 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(php|html|htm)\ HTTP/
RewriteRule ^(.*)index\.(php|html|htm)$ https://%{HTTP_HOST}%$1 [R=301,L]
</IfModule>
Answer the question
In order to leave comments, you need to log in
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
[R=301,L]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^(.*)index\.(php|html|htm)$ https://%{HTTP_HOST}%$1 [R=301,L]
%$1
/
or/$1
RewriteRule ^(.*)index\.(php|html|htm)$ https://%{HTTP_HOST}/ [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question