Solved

mod-rewrite or other solution?

Posted on 2004-09-10
7
263 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

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

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…
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

726 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