Home How to redirect querystring url to subdomain url using htaccess
Reply: 0

How to redirect querystring url to subdomain url using htaccess

user437
1#
user437 Published in May 21, 2018, 5:00 pm

I want to redirect query string URL to subdomain URL:

https://domainname.com/login/?_redirected=yes to http://subdomain.domain.com.

I tried some of htaccess code but it's not working. How can i solve this.

RewriteCond %{HTTP_HOST} =myhost.com [NC]
RewriteCond %{QUERY_STRING} ^(p=1&preview=true)
RewriteRule ^$ http://alt.myhost.com/?%1 [R=301,L]
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.385357 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO