Jump to content

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

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.