You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Thomas Schweikle <tp...@vr-web.de> on 2007/11/22 23:14:24 UTC
[users@httpd] Re: redirects
Joshua Slive schrieb:
> On Nov 22, 2007 4:10 AM, Thomas Schweikle <tp...@vr-web.de> wrote:
>> Hi!
>>
>> I have configured apache2:
>>
>> ScriptAlias /mirrorlist "/usr/share/mirrorlist/mirrorlist"
>> <Directory "/usr/share/mirrorlist">
>> Options None
>> AllowOverride None
>> Order allow,deny
>> Allow from 172.16.0.0/16
>> Allow from 192.168.0.0/16
>> </Directory>
>>
>> RewriteEngine on
>> RewriteRule "^/?(.*)$" "/mirrorlist?$1"
>
> You would need the [PT] flag on the RewriteRule to ask that the
> ScriptAlias be applied to the result. But why not just replace the
> ScriptAlias with
> ScriptAlias / /usr/share/mirrorlist/mirrorlist
> or
> ScriptAliasMatch ^/$ /usr/share/mirrorlist/mirrorlist
> (depending on what you are looking for. Your RewriteRule is not at all
> clear, since RewriteRules do not match the query string (the part
> after the ?).)
Thanks! It is working now as expected. I used the second form. It
allows matching "/" only and keeping other services working.
--
Thomas
---------------------------------------------------------------------
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