Re: Redirect https' 404 to http...

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

 




----- Original Message -----
> From: Igor Galić <i.galic@xxxxxxxxxxxxxx>
> >>  is there a simple way to redirect all https' 404 to http?
> > I don't get it.
> > What problem are you trying to solve?
> 
> Just as I said; "redirect  all https' 404 to http"
> We want to limit https to a few URLs...
> https://host/nonhttpsurl => 404 => http://host/nonhttpsurl => 200

I'd use mod_macro for that:
  http://www.cri.ensmp.fr/~coelho/mod_macro/


<Macro SSLVhost $name
<VirtualHost *:443>
  ServerName $name
  DocumentRoot /srv/web/$name
  SSLStuff /some/place/$name
  ErrorDocument 404 http://$name/not404
</VirtualHost>
</Macro>

> From: Tom Evans <tevans.uk@xxxxxxxxxxxxxx>
> > What you can do is do an 'is an existing URL check, via a
> > subrequest'
> > with the -U flag. Something like this:
> > 
> > RewriteCond %{HTTPS} On
> > RewriteCond ! -U %{REQUEST_URI}
> > RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
> > 
> > However, I would never do this. This would make every single SSL
> > request make an additional request to see if the URL exists, which
> > would be very expensive.
> 
> Ok.  We will have to weight the additional load...
> I understand it will be doubled in case of a 200 (low occurences).
> But for all the 404s, it is only configuration parsing in RAM, plus
> one "file not found" on the filesystem, right?
> 
> Thx,
> JD
> 

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@xxxxxxxxxxxxxx
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE

---------------------------------------------------------------------
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