T
T
tishevich2017-05-29 21:59:03
htaccess
tishevich, 2017-05-29 21:59:03

How to make replacement rule for question mark in .htaccess?

Good afternoon!
I have such a problem, I rarely use htaccess, so I have difficulties, I will be glad if someone can help
So that files like test1.ru/index.html-p=2310.html
are displayed in the browser as test1.ru/index.html?p=2310 .html has
the following rule:
RewriteCond %{QUERY_STRING} ^([^\?]+)$
RewriteRule ^(.*)$ /$1-%1?
Tell me the rule for this case:
so that files like test1.ru/index.html%3Fp=2310.html
are displayed as test1.ru/index.html?p=2310.html
And how to write them both correctly so that they do not conflict with each other another so that both types of files are processed?
Side question:
- I used a testerhtaccess.mwl.be and it shows that RewriteRule ^(.*)$ /$1%3F%1? everything is done as it should, but on the real server there is a replacement like test1.ru/index.htmlFp=2310.html Is the tester wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question