Solved

mod-rewrite or other solution?

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
IPv6 Networking 6 90
transferring settings for apache and mysql 2 71
Increase size of permitted URI 4 40
Problem to get function 52 83
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now