S
S
Sergey Miller2019-09-13 14:39:33
htaccess
Sergey Miller, 2019-09-13 14:39:33

How to redirect from a page without the get parameter to the same page, but with the htaccess parameter?

I can’t find a working option on the Internet. For example, you need to direct
c tohttp://site.ru/page.phphttp://site.ru/page.php?param

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2019-09-13
@blackseabreathe

RewriteCond %{QUERY_STRING} !(^|&)(.+)($|&)
RewriteRule ^page\.php$ /page.php\?param [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question