Redirect all subfolders to main domain...

Using a single web hosting account to host multiple sites

Redirect all subfolders to main domain...

Postby tthdoc » Sun Jan 06, 2008 9:20 am

I have been trying to figure this out, but everytime I think I found a solution, nothing works. Here is what I want to do.

You have a site name eg. www.themaindomain.com

You have various folders and subfolders eg.
themaindomain.com/sub1
themaindomain.com/sub1/extra1
themaindomain.com/sub2
etc...

Lets say in themaindomain.com file index.html, there are multiple links to various folders and subfolders. I want to set it up so that no matter what link they click on, the URL at the top stays at www.themaindomain.com.

For example, say there is link1 in the index page and clicking it takes you to www.themaindomain.com/sub1/extra1. When you click on it, I want the URL not to change, but to still say www.themaindomain.com. Same for any link I have now or new ones that may be added in the future.

And if possible, since I am new at this, could you explain what the code is doing so I can learn more as well :D

Thanks

Doc
tthdoc
 
Posts: 1
Joined: Sun Jan 06, 2008 8:38 am

Postby richardk » Sun Jan 06, 2008 1:11 pm

You can't do that with mod_rewrite. A similar thread.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 7 guests

cron