Forum Moderators: buckworks & webwork

Message Too Old, No Replies

New domain name points to subfolder

         

bradshjw

8:03 pm on Aug 6, 2008 (gmt 0)

10+ Year Member



Forgive me if this has been adressed in another thread before, but I couldn't find exactly what I was looking for.

I have 2 domain names, a primary and secondary. I want the secondary domain to point to a subfolder in the primary domain. For example, I have maindomain.net/subfolder and I want domain2.net to point to maindomain.net/subfolder. But I also want anything under maindomain.net/subfolder to use domain2.net as the main url. Like maindomain.net/subfolder/something.php should appear as domain2.net/something.php.

Is there a good tutorial out there on domain redirects?

[edited by: Webwork at 9:13 pm (utc) on Aug. 6, 2008]
[edit reason] Removed multiple hotlinking examples. Please use Example.com next time [/edit]

jdMorgan

8:58 pm on Aug 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is not something that can be done using a redirect, since a redirect would 'expose' the maindomain.net/subfolder path in the visitor's browser address bar.

What you want is an internal rewrite. How you do this depends on whether you have a 'control panel' that can do this mapping for you, or whether you can use mod_rewrite (on Apache) or ISAPI Rewrite (on Windows IIS).

Jim

bradshjw

7:22 pm on Aug 7, 2008 (gmt 0)

10+ Year Member



I can use the mod_rewrite on my server.