I
I
Ilya17912021-01-11 16:14:24
Joomla
Ilya1791, 2021-01-11 16:14:24

Do Joomla pages have duplicates with multiple html?

Good afternoon!
There is a site on Joomla, where the option "Add suffix to URL" is enabled. To eliminate duplicate pages, I wrote the following code in .htaccess:

RewriteCond %{REQUEST_URI} (.*/[^/.]+)($|\?)
RewriteRule .* %1.html [R=301,L]
RewriteRule ^(.*)/$ /$1.html [R=301,L]


You can't turn it off, because the site is promoted by c .html urls at the end. The code normally redirects from pages with and without a slash to .html, but there is another problem. All pages open with an unlimited amount of html at the end, that is, for example, the page opens at
https://site.ru/katalog.html
https://site.ru/katalog.html.html
https://site.ru/katalog .html.html.html etc.

What can be done so that the page opens only to the address https://site.ru/katalog.html , and all the rest is perceived as a 404 page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergei Tolkachev, 2021-01-13
@sergeytolkachyov

Leave the default .htaccess. In the standard form, such problems do not arise.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question