Answer the question
In order to leave comments, you need to log in
Redirect from index pages (.html and .php) not configured correctly?
Hello! You need to redirect from https://site.ua/index.html to catalog https://site.ua/. I know what can be found in Google, but all the examples that I found do not work.
Found this code:
RewriteCond %{REQUEST_URI} ^(.*)/index\.php$
RewriteRule ^(.*)index\.php$ http://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{REQUEST_URI} ^(.*)/index\.html$
RewriteRule ^(.*)index\.html$ http://%{HTTP_HOST}/$1 [R=301,L]
Answer the question
In order to leave comments, you need to log in
Good evening.
RewriteEngine On
RewriteCond %{REQUEST_URI} /index\.php\ HTTP/
RewriteRule ^index\.php$ http://%{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