httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: [users@httpd] mod_rewrite's behaviour changes while upgrading Apache1 -> 2
Date Fri, 03 Sep 2004 14:19:55 GMT
On Fri, Sep 03, 2004 at 09:32:30AM +0200, outbound@centrum.cz wrote:
...
>         RewriteCond  %{HTTP_HOST}  ^www\.ceadvisor\.cz
>         RewriteRule  ^/page_(.*)_(.*)\.html$ http://www.domain.com/index.php?page=$1&service=$2
[L,QSA]
...
> Behaviour of Apache2:
> Unfortunately apache2 is doing it wrong. It calls good page, BUT send 302 REDIRECT code
and redirect user to that php page. So, the problem is that user see index.php?page=zviditelneni&service=1
in his URL row instead of  www.domain.com/page_zviditelneni_1.html.

If you get an implicit redirect from this rule that means the URI
reduction didn't happen, because the server thought that
"www.domain.com" didn't match the request, which may depend on the
UseCanonicalName setting and what URL you entered into the browser. 

If you omit the http://www.domain.com/ part from the right-hand-side of
the rule it should work correctly since you'll never get an implicit
redirect.

joe

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message