You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by PM...@nypl.org on 2005/03/15 14:24:15 UTC

RE: [users@httpd] basic rewrite question concerning redirect : ^$ or ^/$

I think this may be working on the first site since the site is the first
virtualhost (apache's default if there is no match). If you switch them
around, you should then see the other one behave normally. In short, it's
the first one that is actually broke. 

I don't know that I've ever tried it, but how about ^[|/]$ or ^[$|/$]

Again, never tried it...

> -----Original Message-----
> From: Hanack Leif [mailto:Leif.Hanack@t-systems.com]
> Sent: Tuesday, March 15, 2005 5:30 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] basic rewrite question concerning redirect : ^$
or
> ^/$
> 
> Hello,
> 
> i detected a strange behaviour:
> 
> I have two vhosts:
> 
> <VirtualHost *:80>
>     ServerName intra-jawa.com
> 
>     RewriteEngine on
>     RewriteRule ^$ http://intra-jawa.com/portal/login.jsp [R,L]
>     ...
> </VirtualHost>
> 
> <VirtualHost *:80>
>     ServerName intra-jawa1.com
> 
>     RewriteEngine on
>     RewriteRule ^$ http://intra-jawa1.com/portal/login.jsp [R,L]
>     ...
> </VirtualHost>
> 
> When i call http://intra-jawa.com i'm redirected to the login page.
> Calling http://intra-jawa1.com i receive a 403 : Access denied.
> 
> Why?
> 
> Changing the rule to
> 
>     RewriteRule ^/$ http://intra-jawa1.com/portal/login.jsp [R,L]
> 
> will forward to the login page even if i just enter the
> domain http://intra-jawa1.com without a trailing /
> 
> My idea was to have a rule that automatically redirect to a login
> page when the blank domain names are entered.
> 
> TIA, Leif
> 
> 
> ---------------------------------------------------------------------
> 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
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org