httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mimiko <vbv...@gmail.com>
Subject Re: [users@httpd] Redirect to other server if file/directory does not exists.
Date Tue, 05 Aug 2014 09:44:30 GMT
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 %{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 %{REQUEST_FILENAME} helps.

-- 
Mimiko desu.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message