Answer the question
In order to leave comments, you need to log in
How to redirect visitors from html page to aspx?
The databases of different search engines included site pages of the form page1.aspx.html
and page1.aspx . Pages ending in .html no longer physically exist and everyone needs to be redirected from *.aspx.html to *.aspx
Public code, does not help (it only cuts for pages like page.html -> page )
RewriteEngine on
RewriteBase /
RewriteCond %{ THE_REQUEST} ^[AZ]{3,9}\ /([^.]+)\.html\ HTTP
RewriteRule ^([^.]+)\.html$ yukimori.ru/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !(\.[^./]+)$
RewriteCond %{REQUEST_fileNAME} !-d
RewriteCond %{REQUEST_fileNAME} !-f
RewriteRule (.*) /$1.html [L]
Help how to do it.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question