Rewrite corner case issues

David Thornton northdot9-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri Mar 14 16:22:08 UTC 2014


I highly recommend telneting to the port and issuing the commands directly.

telnet www.webserver.com 80

GET / HTTP/1.1<enter>
Host: www.webserver.com<enter>
<enter>
.. data comes out hopefully.

This will let you know exactly what the server is responding with ... are
you getting a time-out  before or after the redirect.

If you do the above and get back , right away, something like this:


HTTP/1.1 302 Moved
Server: fred
Date: Fri, 14 Mar 2014 16:16:22 GMT
Content-Type: text/html
Location: myotherserver:443/sooper.html

Then you know that the redirect is working , but the resulting url is broke.

I also like to try HTTP/1.0  to see how the server (mis)behaves. like this:

telnet server 80
GET / HTTP/1.0<enter>
<enter>
... data comes out


You can then also use the same "telnet" trick to test the secure location
give by the "Location:" Header, but you can't use telnet.  You can use the
openssl command line to get the same sort of thing but encrypted, like this:

openssl s_client -connect www.mywebserver.com:443

GET / HTTP/1.1<enter>
Host: www.mywebserver.com<enter>
<enter>


David Thornton




On Fri, Mar 14, 2014 at 8:37 AM, William Muriithi <
william.muriithi-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:

> Gosh
>
> Was sending from a phone, not a good idea as you can see now.  Redoing
> it from a desktop
>
> > > For example "http://example.org/index.html" time out but "
> https://example.org/index.html" works. That make me suspect the
> RewriteRule is wrong, but haven't figured what I may be missing despite
> tinkering with it for 2 hours night. Hoping someone could easily notice my
> mistake, would highly appreciate any pointer.
> > >
>
>
> RewriteEngine On
>
> <VirtualHost *:80>
>
>          <Location /soap/servlet/>
>
>               ProxyPass http://127.0.0.1:8080/soap/servlet/
>
>               ProxyPassReverse http://127.0.0.1:8080/soap/servlet/
>
>          </Location>
>
>
>
>          <Location />
>
>               RewriteCond     %{REQUEST_URI}    !^/soap/servlet [NC]
>
>               RewriteCond     %{HTTPS}           off
>
>               RewriteRule      ^(.*)$
> https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
>
>          </Location>
>
> </VirtualHost>
>
>
>
>  Sorry again for the earlier mess.
>
> William
> --
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20140314/3a8273e9/attachment.html>


More information about the Legacy mailing list