A
A
Artem Andrushko2018-09-07 22:54:03
htaccess
Artem Andrushko, 2018-09-07 22:54:03

How to handle link parameters via htaccess?

Good afternoon.
I need to redirect from abc.com/param to test.bcd.com/?query=param via htaccess.
Wrote this:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www\.)?test\.bcd\.com$ [NC]
RewriteRule .* http://test.bcd.com/?query=%{REQUEST_URI} [R=301,L]

Am I thinking right? What else to fix?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question