Web Hosting Forum | Lunarpages
News: October 6, 2008 - Submit Your Site for the October 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 13, 2008, 12:02:13 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Problem with the subdomain  (Read 74 times)
improve
Newbie
*
Offline Offline

Posts: 2


« on: July 03, 2008, 08:13:56 AM »

I have attached two domain names in my web hosting. I want to create a sub-domain name which are the same for both of the domains.
After finished, I found out that their directories are the same. Therefore, if I upload my site to the directory, both the sites with the same sub-domain name will be the same.
I have tried to change the directory when creating the sub-domain name, but it seems that there is no way to do it.

I want to find a solution for it
Logged
Vitalian
Spaceship Navigator
*****
Offline Offline

Posts: 75



« Reply #1 on: July 03, 2008, 09:57:49 AM »

Unfortunately, this is one of the flaws in the way LP arranges domains. The only way I can see to work around this is:

You want -

    http://www.domain1.com/
    http://www.domain2.com/
    http://other.domain1.com/
    http://other.domain2.com/

    and both sub- domains should refer to different sites.

What you need to do is delete the sub-domain over your second domain. Then, create a new sub-domain with its own unique name. Then, use .htaccess, and mod_rewrite all calls for the original sub-domain over the second domain to the new sub-domain. At least, that should work. Get a second opinion before you try it, or e-mail support.
Logged
improve
Newbie
*
Offline Offline

Posts: 2


« Reply #2 on: July 03, 2008, 10:10:45 AM »

thx for your answer, but can you tell me in detail?
Logged
Vitalian
Spaceship Navigator
*****
Offline Offline

Posts: 75



« Reply #3 on: July 03, 2008, 10:38:07 AM »

So, let's say you have the domains http://www.domain1.com/ and http://www.domain2.com/ on your account. And, you want to add sub-domains, both called "other" onto both domains. So, you'll now have http://other.domain1.com/ and http://other.domain2.com/ as well. And, you want both sub-domains to access different sites.

So, first, create a new sub-domain from cPanel called http://other2.domain2.com/. Then, delete the sub-domain called http://other.domain2.com/. Now comes the hard part. The following should go into a .htaccess file (but needs to be edited to correspond to your domains!):

Code:
**CODE DOES NOT WORK**

I'm not a RewriteEngine expert, so you may want to have someone verify that this code is OK. It should be good though. I took it from here. The examples were for redirecting homepages due to search engine issues, but I modified to fit your need.

That doesn't work! Just tried it on my account. I have no more ideas on how to get this working. My only suggestion is to use a different, but similar, sub-domain for your second domain.
« Last Edit: July 04, 2008, 12:16:15 PM by Vitalian » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM