Answer the question
In order to leave comments, you need to log in
How to replace comma in htaccess?
Hi all!
Help, plz, a little with the regular season?
There are requests for a site like:
/index.php/topic,109806.msg40759.html#msg40759
/index.php/topic,108936.0.html
/index.php/board,1.0.html
RewriteEngine On
RewriteCond %{QUERY_STRING} ^topic=(\d{1,7})\.(\d{1,5})$
RewriteRule ^index.php$ index.php/topic,%1.%2.html
RewriteCond %{QUERY_STRING} \.html$ [NC]
RewriteRule ^(index\.php/.*)$ /$1,%{QUERY_STRING}? [L,NE,NC,R=301]
RewriteCond %{QUERY_STRING} .*topic.*
RewriteCond %{REQUEST_URI} .*topic.*
RewriteCond %{REQUEST_URI} .*html.*
RewriteRule ^(.*)$ /$1? [R=301,L]
Answer the question
In order to leave comments, you need to log in
And what will break if you put an escaped dot or even an ordinary one instead of a comma (I don’t remember if it should be escaped there at all)?
Indeed, what will break for you if you change the comma to any character is not so critical for you, and this problem is critical, and there are a million options for solving it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question