Solved

mod-rewrite or other solution?

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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

738 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