Answer the question
In order to leave comments, you need to log in
The address of the pages has changed, what to write in htaccess?
Please tell me what to write and where. In general, there was a site
site.ru/index.php?page=create+site+12+May and now it has become
site.ru/?p=create+site+12+May
, can you somehow redirect to htaccess?
Answer the question
In order to leave comments, you need to log in
RewriteEngine ON
RewriteCond %{QUERY_STRING} ^p=(.*)
RewriteRule ^.+$ index.php?page=%1 [L]
RewriteCond %{REQUEST_URI} ^/index.php$ [NC]
RewriteCond %{QUERY_STRING} ^page=(.*)$ [NC]
RewriteRule .* /?p=%1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question