You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "hotmaster @ saudiabm" <ho...@saudiabm.com> on 2002/05/26 01:51:21 UTC

if Statement

Hi

Is there any way to use "if" in .htaccess
I want to use :

If(hostname == 'webserver1.com') {
RewriteEngine on
RewriteRule   ^(.*)$  http://www. 'webserver1.net/$1  [R,L]
}

I have linux server 

Thank you



   _______________________
http://www.SaudiABM.com
-- * احفظ الله يحفظك * --
  _______________________
About Islam http://www.al-muntada.com/islam/
  _______________________



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: if Statement

Posted by Joshua Slive <jo...@slive.ca>.
On Sun, 26 May 2002, hotmaster @ saudiabm wrote:

> Hi
>
> Is there any way to use "if" in .htaccess
> I want to use :
>
> If(hostname == 'webserver1.com') {
> RewriteEngine on
> RewriteRule   ^(.*)$  http://www. 'webserver1.net/$1  [R,L]
> }

RewriteEngine On
RewriteCond %{HTTP_HOST} webserver1.com [NC]
RewriteRule   ^(.*)$  http://www.webserver1.net/$1  [R,L]

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org