Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod_rewrite help

Status
Not open for further replies.

JamesGMills

Programmer
Aug 15, 2005
157
GB
Hi,

I am really struggling with this

I am looking to do the following:

Direct to domain.co.uk
Direct domain.co.uk to website.php
Direct admin.domain.co.uk to admin.php
and direct every other subdomain to box.php



This is what I have so far... miles off I think

RewriteCond %{http_host} ^ [NC]
RewriteRule ^(.*)$ [R=301,NC]

RewriteCond %{HTTP_HOST}!^domain\.co\.uk
RewriteRule ^(.*)$ /website.php/$1 [L]

RewriteCond %{HTTP_HOST}!^admin\.domain\.co\.uk
RewriteRule ^(.*)$ /admin.php/$1 [L]

------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top