Re: Redirection based on HTTP Host header

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

 



You can use mod_rewrite to detect a HTTP Header, compare the value & redirect to a local port if the condition is satisfied
RewriteCond %{HTTP:HTTP_X_SOMEHEADER}
RewriteRule ^/(.*)$ http://127.0.0.1:14333/$1 [P,L] 


On Thu, Aug 19, 2010 at 5:02 PM, Frank Zappo <frank_zappo@xxxxxxxxxxx> wrote:
Thanks for responding, and apologies if I wasn't very clear.
I have a server that is both RSA and ECC capable.  I want the
server to accept HTTPS connections from both RSA and ECC clients
on the same TCP port.  Presumably, the default port on the server
will support only one of the algorithms (say, RSA), and thus need
to detect the capabilities of the client so it can redirect to a different
port if an ECC client connects.
 
Any ideas as to how this would be best accomplished?  Or is this
not how it works?
 
Frank

 
> Date: Thu, 19 Aug 2010 18:47:52 +0200
> From: megabrutal@xxxxxxxxx
> To: users@xxxxxxxxxxxxxxxx
> Subject: Re: Redirection based on HTTP Host header

>
> Hello,
>
> Just to clarify it: so you want to accept HTTP and HTTPS connections
> on the same TCP port?
>
> MegaBrutal
>
>
> 2010/8/19 Frank Zappo <frank_zappo@xxxxxxxxxxx>:
> > Good day,
> >
> > Is there a way to specify directives to scan the HTTP Host header for
> > specific attributes, and then redirect based upon the value of those
> > attributes?  For example, I'd like my server to be configured such that my
> > client can open an HTTPS session to the same address/port regardless of
> > whether the client has an RSA-based certificate or an ECC-based
> > certificate.  So, the server would check the HTTP Host header to determine
> > the whether the client is ECC-capable and then redirect to a different
> > ECC-capable port, otherwise it would use the default port.
> >
> > Or is there a better way to accomplish the same thing?  Any comments would
> > be appreciated.
> >
> > Frank
> >
>
> ---------------------------------------------------------------------
> 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
>



--
Thanks & Regards,
Pratyoosh Sharma

[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