[users@httpd] redirect only if a URL does not exists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I'm using Apache 2.2 from the xampp project on Windows XP and 2003. Now I want to redirect a request *ONLY* if the URL does not exist. I know the !-U flag for a RewriteCond but can't get it working. Here's what I tried to do :

<IfModule mod_rewrite.c>
 RewriteEngine On
 ...
 RewriteCond 	%{REQUEST_URI} !-U
 RewriteRule    ^/(.*).do  http://localhost/Portal_Update.php
 ...
</IfModule>

This results in an 503 error  so it seems that the RewriteRule was not executed. 

Second try :
RewriteCond 	%{QUERY_STRING} !-U
RewriteRule    ^/(.*).do  http://localhost/Portal_Update.php
This rule is exeuted *everytime*, even if the requested URL exists.

Third try 
RewriteCond 	%{THE_REQUEST} !-U
RewriteRule    ^/(.*).do  http://localhost/Portal_Update.php
This results in an 502 error  so it also seems that the RewriteRule was not executed. 

And my last try :
 RewriteCond   ^/conergy/(.*).do !-U
 RewriteRule   ^/conergy/(.*).do  http://localhost/Portal_Update.php
This rule is also exeuted *everytime*, even if the requested URL exists.

Also define an ErrorDocument for error 502 or 503 didn't worked.
So what I'm doing wrong ?

Thanks, Lothar


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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux