Answer the question
In order to leave comments, you need to log in
How to remove id and .html from address in DLE 10.4?
Tell me how to remove the id and .html output from the link address in DLE, i.e. so that instead
of site.ru/category/sub-category/id-news.html the
link looks like:
site.ru/category/sub-category/news
The Internet is full of instructions, but they do not work on version 10.4.
Answer the question
In order to leave comments, you need to log in
In the .htaccess
file we find RewriteEngine on
below paste
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+)\.html\ HTTP
RewriteRule ^([^\.]+)\.p?html?$ http://example.com/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !(\.[^./]+)$
RewriteCond %{REQUEST_fileNAME} !-d
RewriteCond %{REQUEST_fileNAME} !-f
RewriteRule (.*) /$1.html [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question