Manual talk:$wgActionPaths

"action" Directory
I created an "action" directory with an '.htaccess' and an 'index.php'. RewriteEngine on RewriteRule ^(.*?)/(.*?)$ ../index.php?action=$1&title=$2
 * 1) .htaccess

From the visitor's side, it's identical. I did this because it would not work in conjunction with my other RewriteRules. Egingell 07:20, 16 August 2007 (UTC)

Didn't work for me Kcmartz 16:33, 10 December 2010 (UTC)

Alternate Option
On my setup, it would appear that using a '.htaccess' in the wiki root and using: RewriteRule ^/action/([a-z]*)/(.*)$ /index.php?action=$1&title=$2 [L,QSA] doesn't work as suggested. Using 'RewriteLog', I found that the following works: RewriteRule ^action/([a-z]*)/(.*)$ index.php?action=$1&title=$2 [L,QSA]

Hope this helps somebody. Jean-Lou Dupont 01:17, 9 May 2007 (UTC)

Helped me! I had the same problem. You are a legend. Thank you Jldupont! -- 04:56, 12 May 2007 58.10.167.198

Neither works for me, presumably because of my other rewriting. =/ Sy Ali 00:34, 19 May 2007 (UTC)

Infinite Loop
Using RewriteRule ^/action/([a-z]*)/(.*)$ /index.php?action=$1&title=$2 [L,QSA]

on my .htaccess on (1)(2)(3) and (4) i get an infinite loop :|

RewriteEngine On (1) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d (2) RewriteRule ^wiki/(.*) wiki/index.php?title=$1 [PT,L,QSA] (3) RewriteRule ^wiki/*$ wiki/ [L,QSA] RewriteRule ^/*$ wiki/ [L,QSA] (4)

any ideas? LuisManson
 * I don't know.
 * The rule matches everything including 'index.php' (add  just before it).
 * Same story as number 2.
 * If  is number 4, it's still the same problem as numbers 2 and 3.
 * Egingell 07:20, 16 August 2007 (UTC)

lighttpd and url rewriting
in your vhost conf or something:

in LocalSettings.php or wherever:

BTW, I don't know if you noticed - I hope you did ;) - that in the lighttpd part, I flipped the rewritten substitutions (I think that's what they're called): "^/wiki/a/([a-z]*)/(.*)$" => "/w/index.php?title=$2&action=$1" -- see the $2, then $1 ? I did that, otherwise it wouldn't work. I imagine I would have to compensate for older MW installs, that had the action=FOO&title=BAR instead of title=BAR&action=FOO like it is now. Seems to me lighttpd and MW are taking the query string very literally (which is of course a big fat "duh!").

(I didn't use the syntax highlighting, I don't remember the, um, syntax.)

-- Kjikaqawej 08:47, 6 September 2008 (UTC)

...as for apache
I suppose you could very easily do this for an apache-based mediawiki, since I pretty much ripped the rewrites from that ;).

-- Kjikaqawej 08:49, 6 September 2008 (UTC)