Answer the question
In order to leave comments, you need to log in
How to write a redirect for htaccess with cnc?
For example, there are pages
mysite.ru/catalog/obuv/kozzh?PAGEN_1=12 on mysite.ru/catalog/obuv/kozzh
mysite.ru/catalog/obuv/plohaia?PAGEN_1=149 on mysite.ru/catalog/obuv/plohaia
etc. What needs to be written in htaccess?
Answer the question
In order to leave comments, you need to log in
GET is not part of the url by this and
RewriteCond %{QUERY_STRING} (^|&)PAGEN_1\=12($|&) [NC]
RewriteRule ^catalog/obuv/kozzh$ catalog/obuv/kozzh? [L,R=301]
RewriteCond %{QUERY_STRING} ^PAGEN_1=
RewriteRule (.*) $1? [L,R]
This is not for you in .htaccess, but in a file like page.php, which, using this get-parameter, selects news from the database with such a value in the url field, for example.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question