Jump to content

subdomains masking directories


patawic

Recommended Posts

My website (http://www.gamerstats.net) uses a domain of card.gamerstats.net to display gamercards.

Recently my host had an issue with a harddrive that my server (is a vps, not web hosting) is hosted on and i was unable to retrieve my httpd.conf file which handled the subdomain.

 

Basically i need to make the subdomain

card.gamerstats.net

mask over the top of

gamerstats.net/card/

 

For example

http://www.gamerstats.net/card/xbox/nxe/Xifictor/1/

would be masked as

http://card.gamerstats.net/xbox/nxe/Xifictor/1/

 

A quick response would be wonderful as i need to get my website functioning as soon as possible

 

I would prefer to do it using A records and httpd.conf

But if its possible to do it using a .htaccess file, that will also work.

Link to comment
https://forums.phpfreaks.com/topic/259857-subdomains-masking-directories/
Share on other sites

sorry for the delayed response, the edit button disappeared.

 

It appears that i cant do it with a .htaccess file, as i have separate htaccess files in my card directories (eg. in the nxe folder) That handles further rewrites.

It must be done in the httpd.conf file.

Well that was stupid of me, Completely forgot that you have to restart apache for it to reload the config.

 

Fixed it by doing this

Listen 80
NameVirtualHost *

<VirtualHost *>
ServerName www.gamerstats.net
DocumentRoot C:\xampp\htdocs
</VirtualHost>

<VirtualHost *>
ServerName card.gamerstats.net
DocumentRoot C:\xampp\htdocs\card
</VirtualHost>

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.