httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Moretti <>
Subject Re: [users@httpd] RewriteRule & jsessionid
Date Wed, 17 Nov 2010 14:15:15 GMT
>     Hi
>     I experience some problem with apache, mod_rewrite and mod_proxy.
>     I get some timeouts that deny access to the server.
>     Here is the error message I get:
>     (70007)The timeout specified has expired: proxy: error reading
>     status line from remote server XXX
>     [Wed Nov 17 11:57:09 2010] [error] [client] proxy:
>     Error reading from remote server returned by
>     /YYY/yyy;jsessionid=CB0770CE21131F029565895AC72B921E
>     It happens when I set this particular rule:
>     RewriteRule ^/YYY/yyy(.+)  /YYY/yyy$1  [P]
> To me, this rule doesn't make sense. You are rewriting it to be the same
> thing as before.

This rule looks weird in my opinion also; but works properly on our 
development server.

It must be: get the whole URL, but YYY/yyy, and do the mapping.
Something like
     RewriteRule ^/([^YYY/yyy].+)  /YYY/yyy$1  [P]

The redirection is on the same server, within the same virtual host.
http://XXX/?smth   would be    http://XXX/YYY/yyy?smth
(XXX is

And both URLs must work.

>     In fact, I want to mask YYY/yyy in URLs, and create an internal,
>     silent, redirection.
>     e.g.:
>     would be in fact
>     http://XXX/YYY/yyy?smth
> you are reverse proxying from a different host then that host should get
> mentioned in the rule.
> E.g
> NameVirtualHost *:80
> <VirtualHost *:80?
> ServerName <>
> RewriteEngine on
> RewriteRule / http://XXX/YYY/yyy/ [P,QSA]
> </VirtualHost>
> QSA would add the query string from the original URL to the rewritten URL.
>     Maybe I do something wrong. The rule could certainly be more
>     properly written.
>     But on our development server, I don't get the problem (but apache
>     versions and configurations are a bit different).
>     Any idea ?

S├ębastien Moretti

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message