Jump to content

Access subdomain from url.


seventheyejosh

Recommended Posts

Quick question. If I have the following:

 

site.com/forum/

 

&

 

forum.web.com

 

How can I, by using one or both of the .htaccess files for those roots, make it so when a user goes to site.com/forum/ it goes to forum.web.com, but the url stays the same? I know I can make it redirect to the subdomain, but I want the user to think they are still at the same url. I also want it to make all the requests look normal: site.com/forum/ucp.php?v=1&s=2 .

 

Is there some kind of proxying or reverse proxying I can do?

 

Thanks so much,

 

Josh

Link to comment
https://forums.phpfreaks.com/topic/216323-access-subdomain-from-url/
Share on other sites

Well I threw this up there, and it gave me a 500 error:

 

<IfModule mod_alias.c>

Alias /forum /home/lifecode/public_html/rmbforum

</IfModule>

 

Googling reveals that Alias can't be used in .htaccess, only in a <VirtualHost> in httpd.conf, and since my friend's site is on hostgator shared hosting, I'm not able to use that. Is there a way to do something similar through .htaccess? Or just a different method altogether?

 

Thanks!

 

- Josh

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.