Rewriting subdomains

This is a discussion on Rewriting subdomains within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi All My hosting provider doesn't have rewrite logging turned on, so I'm flying blind on this problem. ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-25-2007
Jim Rootham
 
Posts: n/a
Default Rewriting subdomains

Hi All

My hosting provider doesn't have rewrite logging turned on, so I'm
flying blind on this problem.

I am trying to implement a structure where I have:
A domain host1.com on a shared hosting provider.
A virtual domain host2.com pointing to the same IP address as host1.com.

A directory structure

host1.com
app
www
docroot
demo
docroot
test
docroot
dev
docroot

I want to map http://test.host2.com => host1.com/app/test/docroot

(similarly for www, demo, and dev).
There is more path to the absolute root above host1.com

I have been trying variations of:

RewriteEngine On
Options FollowSymLinks ExecCGI -Multiviews

RewriteBase host1.com

RewriteCond %{HTTP_HOST} ^(.*)\.app\.com$
RewriteRule ^.*$ /host2.com/app/%1/docroot/index.html


Is there a stock solution to this problem?

Thanks.

Jim Rootham
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:28 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0