Answer the question
In order to leave comments, you need to log in
How to set up a .htaccess redirect?
you need to convert
from this line:
https://www.example.ru/cat/dir name/1.php?id=4 to this: https://www.example.ru/cat/dir name
redirect from slash to without is, i.e. you need to remove this part 1.php?id=4, and id passes the necessary parameter to open the page, and 1.php are all the same
Answer the question
In order to leave comments, you need to log in
Here is the part that is clear from your TK
RewriteCond %{QUERY_STRING} (?:^|&)id\=(.+)(?:$|&)
RewriteRule ^cat/название/dir/1\.php$ /cat/название? [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question