Subdomain rewrite rule

Using a single web hosting account to host multiple sites

Subdomain rewrite rule

Postby Siberia » Tue Mar 01, 2005 6:28 pm

Hi Guys,
Need help with this been looking everywhere no luck,

Is it possible if i go to members.domain.com.au/index.php

it will look at the file at www.domain.com.au/somefolder/dir/admin/index.php
but url stay the same members.domain.com.au/index.php

or

If i go to members.domain.com.au/settings.php

it will look at the file at www.domain.com.au/somefolder/dir/admin/settings.php but url stay the same members.domain.com.au/settings.php
and where should i put my .htaccess in root or in subdomain dir?
Thanks for any help.
Siberia
 
Posts: 1
Joined: Tue Mar 01, 2005 5:42 pm
Location: Australia

Postby Caterham » Wed Mar 02, 2005 8:13 am

and where should i put my .htaccess in root or in subdomain dir?
in the subdomain dir, because the root dir is not "seen" for requests to the subdomain
  • different webspace accounts, root of subdomain is NOT equal to root of maindomain
    1. with access via local paths; .htaccess in the separate doc root of the subdomain
      Code: Select all
      RewriteEngine On
      RewriteRule ^(.*) /full/unix/filesystem/path/to/wwwdomain/somefolder/dir/admin/$1 [L]
      Try also [PT,L] instead
    2. no access via local paths - mod_proxy required, this will cause double traffic (once for your subdomain and maindomain)
      Code: Select all
      RewriteEngine On
      RewriteRule ^(.*) http://www.domain.com.au/somefolder/dir/admin/$1 [P,L]
Bob
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 111 guests

cron