Hi.
I have a similar issue.
I need to make a rewrite rule for this URL:
/
///geturl?url=http://example.com/somepicture.jpg/
to proxy it to the ///url/ parameter value.
So, i used rules like this:
/RewriteEngine on//
//RewriteOptions Inherit//
//RewriteCond %{REQUEST_FILENAME} !-f//
On 05/08/2014 5:30 PM, Ivan Bondarev ivan.bonda...@neklo.com wrote:
Hi.
I have a similar issue.
I need to make a rewrite rule for this URL:
/geturl?url=http://example.com/somepicture.jpg
to proxy it to the url parameter value.
So, i used rules like this:
RewriteEngine on
OMG, it worked as tiny swiss clocks! Thanks Igor.
05.08.2014 12:36, Igor Cicimov пишет:
On 05/08/2014 5:30 PM, Ivan Bondarev ivan.bonda...@neklo.com
mailto:ivan.bonda...@neklo.com wrote:
Hi.
I have a similar issue.
I need to make a rewrite rule for this URL:
On 05.08.2014 11:36, Igor Cicimov wrote:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{QUERY_STRING} ^url=(.*)$
RewriteRule ^/geturl$%1 [P,L]
Nope, in my case it does not work. The link I use is not in query string
as uses Ivan. So adapting like this:
RewriteCond
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/(.*)$
RewriteRule ^/(.*)$ http://other-server/%1 [P,L]
Does not work. Local resources if esists are shown, but remote resources
are 404 not found /. Nor
On 05.08.2014 15:40, Igor Cicimov wrote:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ http://other-server%{REQUEST_URI}
http://other-server/%1 [P,L]
This worked. The problem alsa was because I was calling:
Hello.
I want to redirect/proxy all request to other server if file/directory
does not exists locally. In apache's help I've found this exmaple:
RewriteCond %{REQUEST_URI}/$1 !-U
RewriteRule ^/(.*) http://otherserver/$1 [P,L]
But it works if file/directory exists, and shows 404 file not