Answer the question
In order to leave comments, you need to log in
How to redirect old links to new ones?
Put the site on a new engine. The old site formed links with the .html ending, and the new engine generates a link in php, respectively, these are 2 different links. How to register in .htaccess so that there is a simple redirect of a link to a link?
It was mysite.com/page.html and it became mysite.com/page, it is necessary that the first one redirects to the second one.
Answer the question
In order to leave comments, you need to log in
Something like this:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\.html$ $1.php?%{QUERY_STRING} [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question