Try $1 instead of $0 ?
Julien Gerhards wrote:
Hi,
I need to build an proxy cache server with a very simple url_rewrite :
The server sould receive URL like this :
http://myserver/img=httpd%3A%2F%2Fotherwebserver%2Fpath%2Ffile
and act as proxy/cache and give the file :
http://otherwebserver/path/file
I tried the following conf :
<IfModule mod_proxy.c>
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{REQUEST_URI} ^/img=*
RewriteRule ^img=([^*]+)$ $0 [L,P]
RewriteLog /var/log/RewriteLog.log
</IfModule>
AllowEncodedSlashes on
ProxyRequests On
<Proxy *>
Order deny,allow
allow from all
# Allow from .example.com
</Proxy>
ProxyRequests On
ProxyVia On
<IfModule mod_disk_cache.c>
CacheEnable disk /
CacheRoot "/var/cache/mod_proxy"
</IfModule>
<IfModule mod_mem_cache.c>
CacheEnable mem /
MCacheMaxObjectSize 1024000
MCacheSize 102400
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/img=*
RewriteRule ^/img=([^*]+)$ $0 [L,P]
RewriteLog /var/log/RewriteLog.log
</IfModule>
</IfModule>
And
<Directory />
Options FollowSymLinks
AllowOverride FileInfo
</Directory>
Julien GERHARDS
---------------------------------------------------------------------
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-unsubscr...@httpd.apache.org
" from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org
---------------------------------------------------------------------
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-unsubscr...@httpd.apache.org
" from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org