Forum
Subdomains in Runway
Hi
I want to create a subdomain for a member's area on this Runway site I'm building. The reason for this is so I can limit access to certain videos stored on Vimeo / Youtube by limiting access from a subdomain only. It's a broadcaster site so some of the videos are private.
How do I get Perch to map a subdomain address to a routed page in Runway?
For example.
Members page is example.com/private.
I want this page to appear as private.example.com/ not forward to the address.
Is this possible? I realise this is out of the remit of Perch but again would appreciate any pointers. I've seen a couple of threads discuss this but no solution's been shared as far as I can see. I'm guessing it's htaccess-related rather than internal routes in Perch.
Many thanks in advance,
Jon
I think you might just be able to tell Perch which page you're using:
I've previously spent some time trying to find answers to the same. I eventually found this as something that worked for me - but I used the Apache conf files. I think you can do similar in htaccess, but you have to use the [P] flag. I can't remember, but you must need to have mod_proxy enabled too.
You don't have to have
ProxyRequests Off
in there (it's the default), but for safety, include it. The firstProxyPassMatch
passes resource requests to the right place (css, images and js folders), otherwise the secondProxyPassMatch
redirects everything to the archive 'page'.The example.co.uk/archive is still accessible in its own right, so possibly call it something a bit more obscure if you don't want people guessing it exists.
This is only helpful if you have access to the Apache conf files...
Thanks for the advice chaps. The client's on a particularly stinky shared hosting package I can't prise them off so I might have to abandon this idea for now.
Kind regards
Jon