Answer the question
In order to leave comments, you need to log in
Which mod rewrite rule should be added?
Hello and please help! There is a site on WP where mod rewrite is enabled. For some reason, I needed to add get parameters at the end of links, so we have domen.ru/contact/office/?type=timetable
Question: what should be done to convert such links to domen.ru/contact/office/timetable
Contents .htaccess is now standard, as VP gives:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Answer the question
In order to leave comments, you need to log in
# 301 --- http://www.mydefile.ru/company/?section=torgovlya&PAGEN_1=9 => http://www.mydefile.ru/about/
RewriteCond %{QUERY_STRING} (^|&)section=torgovlya($|&)
RewriteCond %{QUERY_STRING} (^|&)PAGEN_1=9($|&)
RewriteRule ^company/$ /about/? [L,R=301]
(^|&)........($|&)
this is just an assumption that a get can start both from the beginning and be through &. RewriteRule . /index.php\?id=22 [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question