httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob <bobsie...@googlemail.com>
Subject Re: [users@httpd] Rewrite does not work
Date Tue, 09 Jan 2007 13:18:28 GMT
Huesser Peter wrote:
>> Yes, this will cause a reverse DNS lookup of remote_addr. But anyway,
> I
>> think your order is incorrect. If your request comes through port 80,
>> the 2nd rule won't have any effect, because your first rule matched
>> already.
>>
>> RewriteEngine On
>> RewriteCond %{REMOTE_HOST} \.domain\.ch$
>> RewriteRule ^/testtinfo/fea http://another.url.ch/ [R,L]
>> RewriteCond %{SERVER_PORT} =80
>> RewriteRule ^(.+)$ https://server.domain.ch$1 [R,L]
>>
> 
> Hello Bob
> 
> I changed the order of the RewriteCond as you suggested but
> unfortunately it did not have any effect. Maybe I should also mention
> that /testtinfo is a ScriptAlias:
> 
> ScriptAlias /testtinfo /var/testtinfo/cgi-bin
> 
> Could this cause the problem?

Usually not in server context, mod_rewrite acts before the mapping to 
filesystem occurs. You said that the rewrite log is completely empty, 
when you request /testtinfo/fea? That would mean the rules are not seen 
at all, e.g. a <virtualhost> matched and the rules are defined in the 
main server config section.

-- 
Bob

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