Good time of day! Made the conversion of dynamic addresses to static. Please tell me, now how to make Redirect from old dynamic URL to new static URL . You need to redirect with
Site.ru/?q=рег . Expression
on
site.ru/search/рег . Expression
Good time of day! Made the conversion of dynamic addresses to static. Please tell me, now how to make Redirect from old dynamic URL to new static URL . You need to redirect with
Site.ru/?q=рег . Expression
on
site.ru/search/рег . Expression
Try this, corrected, now it works too
RewriteCond %{QUERY_STRING} ^q=(.*)$ RewriteRule ^(.*)$ search/%1? [L] UPD:
here is the working code
RewriteCond %{QUERY_STRING} q=(.*) RewriteRule ^$ search/%1 [L,R=301,NC] RewriteRule ^search/(.*)?(.*)$ search/$1? [L,NC] Is the most important thing a sign ? in the end. It deletes the previous query with ?q=...
Source: https://ru.stackoverflow.com/questions/514906/
All Articles