Answer the question
In order to leave comments, you need to log in
Is it possible to make such a redirect?
Good afternoon. The webmaster made a new website (redesign) on WordPress. Did you enable some plugin or is it a permanent setting (not familiar with WordPress) - permalinks "/%category%/%postname%.html". Those. all pages of the site are now with html. However, the old site has pages both without html at the end and with it. Is it possible to do in .htacess that "if a link is in a certain section without html, then redirect to the same address, but with html". Or is it unrealistic?
Answer the question
In order to leave comments, you need to log in
possibly.
RewriteEngine On
RewriteCond %{REQUEST_URI} !^.*\.html$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ %{REQUEST_FILENAME}.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question