httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] ProxyPass work correctly but ReWriteRule has some error
Date Thu, 01 Jul 2010 13:58:26 GMT
Look at your configuration again. First, ProxyPass

      ProxyPass /olat http://192.168.1.5:8080/olat
      ProxyPassReverse /olat http://192.168.1.5:8080/olat

This says, when someone requests a URL starting with '/olat', proxy to
'http://192.168.1.5:8080/olat'
It also says to rewrite some headers, but thats not important right now.

Now, your RewriteRule version:

      RewriteRule ^/olat/ http://192.168.1.5:8080/olat [P,L]

This says, when someone requests a URL that begins with '/olat/',
proxy to 'http://192.168.1.5:8080/olat'


Can you really not see the difference?

Let me show you with some URLs, and show what they get proxied to in
each version. PR = Proxy rule, RR = Rewrite

URL: /olat/
PR: http://192.168.1.5:8080/olat/
RR: http://192.168.1.5:8080/olat

URL: /olat/media/base.css
PR: http://192.168.1.5:8080/olat/media/base.css
RR: http://192.168.1.5:8080/olatmedia/base.css

URL: /olat
PR: http://192.168.1.5:8080/olat
RR: None, attempts to serve the file /olat from your document root

I hope you can understand why now.

Cheers

Tom

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