Solved

mod-rewrite or other solution?

Posted on 2004-09-10
7
259 Views
Last Modified: 2010-03-04
I need to make the most of apache in that, I have a system setup that has about 12 domains going to 1 IP on a shared server, I need in the root directory to have an .htaccess file that basically does this:

if the hostname = www.domain1.com
then the content comes from /domain1.com
if the hostname = www.domain2.com
then the content comes from /domain2.com

but here is the issue, i want to make it so that always in the Address bar in the browser it always shows as that the visitor is in the base directory

like if the visit www.domain1.com and want the file terms.php
using standard redirection would show http://www.domain1.com/domain1.com/terms.php
but I need it to show http://www.domain1.com/terms.php


Any ideas anyone, I know this is possible as I have seen it before, but dont know how it was done
0
Comment
Question by:qlogix
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 12024454
Why don't you setup virtual hosts? it is the solution for your job, please have a
look at:

http:Q_20859488.html

also see:

http:Q_21119902.html
0
 

Author Comment

by:qlogix
ID: 12024590
the primary reason, is that I dont own the server, and two that all the sites need to use the same basic backend system, although the other parts are entirely different such as the static content
0
 
LVL 38

Expert Comment

by:yuzh
ID: 12024740
You still can use virtual hosts in this case.
eg, maintain diferent "Document Root" for each virtual host (domain), use  "symbolic link"
to point to the common area (dir), and put the customized contents under the "Document Root".

0
 

Author Comment

by:qlogix
ID: 12024746
As I mentioned before I do not own the server to have access to the httpd.conf file or even making the different doc roots
0
 
LVL 38

Accepted Solution

by:
yuzh earned 500 total points
ID: 12024794
Sorry, you can't do it!

Have a nice weekend!
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question