[aur-dev] [PATCH] Added RewriteRule for Apache

Marcel Korpel marcel.lists at gmail.com
Sun Dec 23 11:55:53 EST 2012


On Sat, Dec 8, 2012 at 12:03 AM, Lukas Fleischer
<archlinux at cryptocrack.de> wrote:
> Can't we use something like "RewriteRule ^(.*)$ /index.php/$1 [L]" here?

I looked at this again, and found this in the documentation:

"If you are using RewriteRule in either .htaccess files or in
<Directory> sections, it is important to have some understanding of
how the rules are processed. The simplified form of this is that once
the rules have been processed, the rewritten request is handed back to
the URL parsing engine to do what it may with it. It is possible that
as the rewritten request is handled, the .htaccess file or <Directory>
section may be encountered again, and thus the ruleset may be run
again from the start. Most commonly this will happen if one of the
rules causes a redirect - either internal or external - causing the
request process to start over."
http://httpd.apache.org/docs/current/rewrite/flags.html#flag_l

A more clear solution is:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index.php
RewriteRule ^(.*)$ /index.php/$1

I'll submit a new patch.

Regards, Marcel


More information about the aur-dev mailing list