CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Apache configuration (http://www.codingforums.com/forumdisplay.php?f=69)
-   -   subdomain same content (http://www.codingforums.com/showthread.php?t=273003)

docock 09-13-2012 08:16 AM

subdomain same content
 
I've got a domain (let's say www.shop.com) and a subdomain (for example test.shop.com).

On www.shop.com is a normal webshop, and I want the same shop on my subdomain without having to copy all files to my subdomain.

So when someone visits my subdomain he sees the same shop, but with the url of the subdomain.

I know this can be done with a rewrite rule, but I don't know how :confused:

Can someone help me?

webmiral 09-27-2012 09:00 AM

ServerAlias
 
ServerAlias may be a solution for you. It is the more effective apache config method than rewrite rules. Your domain become faster if you do not use rewrite engine.

Code:

<VirtualHost *>
ServerName www.shop.com
ServerAlias *.shop.com
#ServerAlias anotherdomain.com #optional
#ServerAlias www.anotherexample.net # optional

# and more config
</VirtualHost>



All times are GMT +1. The time now is 12:12 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.