httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdku...@starband.net
Subject Problem with RewriteRule
Date Tue, 16 Apr 2002 21:03:32 GMT

I am having a problem with Rewrite Rule.
  I what the user to be able to type in there domain name and then
  admin and be redirected to a control panel on the same server but
  running on a different port.
  Like so
  http://userdomainname/siteadmin

  What I have below works but it changes the http://userdomainname to www.domain.com
  I what it to stay the same as what they type in and not change to
  the main site on the server. should I use a variable in the lines
  below to do this and if yes how

RewriteEngine On
RewriteCond %{HTTP_HOST}                ^([^:]+)
RewriteRule ^/admin/?$       http://www.domain.com:81/admincontrol/index.php
RewriteRule ^/siteadmin/?$   http://www.domain.com:81/usercontrol/index.php



In the VirtualHost settings
I have this
<VirtualHost 000.00.000.000>
DocumentRoot /usr/sites/www.domain.com/web
ServerName domain.com
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^000.00.000.000(:80)?$
RewriteCond %{HTTP_HOST}                !^www.domain.com(:80)?$
RewriteRule ^/(.*)                      http://www.domain.com/$1
RewriteOptions inherit
</VirtualHost>





  

-- 
Best regards,
 rdkurth                          mailto:rdkurth@starband.net


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message