Re: [users@httpd] Installing mediawiki with short urls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/13/06, Daniel Giron <daniel.giron@xxxxxxxxx> wrote:
Hi,
I have installed mediawiki on an installation of Apache 2.2.0.
By default, wiki urls are of this form:
http://hostname/wiki/index.php/$1
I wish to shorten it to http://hostname/wiki/$1 and have read several help
documents on the web about this.
I used this RewriteRule: ^(.+)$ /index.php/$1 [L,QSA] inside the wiki
directory in my httpd.conf .
Now, after getting 500 errors, I turned on RewriteLog with RewriteLevel 4,
which gave me some output from mod_rewrite.
Unfortunately, what I saw was that it's been running the rule in a loop
until getting to the limit of internal redirects (by default 10).
Does it mean that the L directive is not working correctly?
Or did I miss something when copying the exact example I saw on several
sites?
I have also tried to change it around by adding /wiki/ in the beginning and
such, but each time
it either didn't work at all, or it went into an endless loop.
Hope somebody can give me some insight into this problem.

Sometimes apache needs to perform a sub-request to serve the request.
Whether this happens depends on the exact context of the RewriteRules.
You can probably fix it either by adding the [NS] (no sub-request)
flag to the RewriteRule, or by specifically excluding requests that
include index.php
RewriteRule !/index.php /index.php/%{REQUEST_URI} [L]

(The QSA is not necessary since the query string is automatically
appended unless you specifically modify it.)

Joshua.

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux