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

Append query string to URL when accessing Subdomain

Charles
1#
Charles Published in 2018-01-12 21:51:00Z

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:

sub.mysite.com

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

sub.mysite.com?query

and pages load as

sub.mysite.com/page?query

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.361816 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO