Home Append query string to URL when accessing Subdomain
Reply: 0

Append query string to URL when accessing Subdomain

user1070 Published in May 25, 2018, 11:12 am

I am a beginner with htaccess and not sure how complex this would be, but I am looking to setup a mirror of my domain on a subdomain where pages loaded under the subdomain append a query string to the url.

So when mysite.com is accessed under a subdomain say:


the content is mirrored and the string is added. So sub.mysite.com loads as:


and pages load as


I have tried messing around with a couple redirect lines but am out of my depth, any help would be appreciated.

I got as far as setting up a 302? redirect for ^(.*) pointing to ?query or $1?query for the pages to add the string but this creates redirect loop since it refers to itself.

Working on kind of an ugly fix for getting a Wordpress plugin to activate on the subdomain but not the main domain. The plugin is triggered by a query string.

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO