There are files * .php.
It is necessary to make it so that in the browser line there are URLs of the * .html type, but so that everything works just as well.
There are files * .php.
It is necessary to make it so that in the browser line there are URLs of the * .html type, but so that everything works just as well.
if($_SERVER['REQUEST_URI'] == "/index.php") header ("Location: /index.html"); или в .htaccess Redirect 301 /index.php http://адрес сайта/index.html Ask the correct question, get the correct answer.
Create a .htaccess file and add it there:
RewriteEngine on RewriteRule ^(.*)\.html $1\.php The rewrite module must be enabled on the server. This is in case you are using Apache.
RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(favicon.ico) RewriteRule ^(.*).html$ $1\.php [L,C] RewriteRule ^(.*).php$ $1\.html [L,R=301] Source: https://ru.stackoverflow.com/questions/45129/
All Articles