Answer the question
In order to leave comments, you need to log in
How to make a correct redirect to .html?
Good day!
There is a site on Joomla. Previously, it was located on a server with Apache, then it was transferred to Nginx + PHP-FPM and, naturally, rewrites had to be rewritten ...
In general, now pages are duplicated by URLs with .html at the end and without .html , I wrote this line: rewrite ^(. *?/.*[^.html])$ $1.html permanent; .
I thought that the problem was solved) But, the following problem appeared: .html is added everywhere (I mean style files, plugins, admin area, etc.)...
Can someone tell me what is not taken into account in this line? I can't understand, I'm not an expert in this matter.
Answer the question
In order to leave comments, you need to log in
Option 1. Do
the opposite: do not add, but delete ".html" Option 2. List all other extensions in a regular expression or generally simplify "if it does not contain a dot":^(.*?/[^\.]+)$
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question