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

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

 



> 
> Start by using the RewriteLog so you can see exactly what is in the
> variables you are using.
> 
> Joshua.
> 

That's what I did all the time. And because I can't find out the problem I tried to ask here. So now I see the following in the rewrite.log :

pass through /con
pass through /error/HTTP_FORBIDDEN.html.var
pass through /error/include/top.html
pass through /error/include/bottom.html
pass through /error/contact.html.var
go-ahead with C:/Programme/xampp/htdocs/Portal_Update.php [OK] <======
pass through /conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/(.*).do
pass through /conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/(.*).do
pass through /conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/(.*).do
pass through /conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/(.*).do
pass through /conergy/^/conergy/^/conergy/^/conergy/^/conergy/^/conergy/(.*).do
pass through /conergy/^/conergy/^/conergy/^/conergy/^/conergy/(.*).do
pass through /conergy/^/conergy/^/conergy/^/conergy/(.*).do
pass through /conergy/^/conergy/^/conergy/(.*).do
pass through /conergy/^/conergy/(.*).do
=============== this redirect should not happen ==================================
 escaping http://localhost/sunreader/Welcome.do for redirect
 redirect to http://localhost/sunreader/Welcome.do?mandant=conergy [REDIRECT/302]
=================================================
 pass through /sunreader/Welcome.do
pass through /error/HTTP_SERVICE_UNAVAILABLE.html.var
pass through /error/include/top.html
pass through /error/include/bottom.html
pass through /error/contact.html.var

That looks very strange. What does it mean ? And because the redirect from 

 escaping http://localhost/sunreader/Welcome.do for redirect
to 
 redirect to http://localhost/sunreader/Welcome.do?mandant=conergy [REDIRECT/302]

did happen I see that the next rule instead of the first rule was executed. The next rule looks like :

 RewriteRule ^/conergy/(.*).do$ http://localhost/sunreader/$1.do?mandant=conergy [R,L]
 RewriteRule ^/suntechnics/(.*).do$ http://localhost/sunreader/$1.do?mandant=suntechnics [R,L]


The Portal_Update.php site above executes a redirect to  http://localhost/conergy/Portal_Update.html or http://localhost/suntechnics/Portal_Update.html. The solution with PHP is just a temporary solution because I can't get the RewriteRule working.

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