homepage Welcome to WebmasterWorld Guest from 50.16.112.199
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Domain to Subdomain Rewrite
domain subdomain re-write
ivanvias



 
Msg#: 4397563 posted 9:29 pm on Dec 13, 2011 (gmt 0)

Is it possible for me to re-write mysite.net to

subdomain.mysite.net using mod-rewrite?


So that when users type mysite.net they see whats in subdomain.mysite.net provided that we already own the domain and subdomain.

 

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4397563 posted 9:36 pm on Dec 13, 2011 (gmt 0)

If they are on the same server, you'd maybe use a rewrite.

If they are on different servers you'd use a reverse proxy.

Both use mod_rewrite and RewriteRules.

lucy24

WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



 
Msg#: 4397563 posted 11:35 pm on Dec 13, 2011 (gmt 0)

when users type mysite.net they see whats in subdomain.mysite.net

Do you want them to see it in both the page and their address bar, or only on the page?

For "same server", read "same userspace" if you are on shared hosting. Otherwise it can get messy.

ivanvias



 
Msg#: 4397563 posted 11:51 pm on Dec 13, 2011 (gmt 0)

Sorry I didnt explain clearly. I have a domain mysite.net and Id like so that when i type mysite.net on the browser I see the content from a subdomain of another site: subdomain.mysite2.com

Note the .net and .com differences.

I know that I could do a redirect from mysite.net to subdomain.mysite2.com via the controll panel since im using GoDaddy, but ultimately the above is what i would like to achieve.

I also would like to know if this would help or if its better to just install the subdomain , which is an entirely different site, that is a subdomain of my main site?

Thanks in Advance

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4397563 posted 12:13 am on Dec 14, 2011 (gmt 0)

Anything is possible. But further advice can't be given until you address the questions already asked...

ivanvias



 
Msg#: 4397563 posted 4:22 pm on Dec 17, 2011 (gmt 0)

Okay this is the final case. I have subdirectories created
in one cpanel account. My main domain already resolves to the index file in www however i have other domains that i want to point to the subdirectories in the same www folder of my hosting account. I guess yes they are in the same folder.

How do i achieve this?

lucy24

WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



 
Msg#: 4397563 posted 10:31 pm on Dec 17, 2011 (gmt 0)

Do you mean that if the user enters

subdomain.example.com

you want them to see content that lives at

www.example.com/subdomain

?

Or do you mean that you've got

www.example.com
www.example.net
www.example.org

all living side by side and you want the user to be sent to the appropriate domain?

What we're trying to figure out is whether you have a DNS question or a proxy question. Suppressing line of thought set off by words "godaddy" which has an ongoing thread of its own.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved