I’ve got mediawiki running on my server, and am using external authentication to log users in. Because of this, I’m using mod_rewrite to redirect users from the wiki log in page to the default log in page for symfony. The url that I am trying to match is this:
http://SERVER/wiki/index.php?title=Special:UserLogin
And the page I’m trying to send them to is:
http://SERVER/login
which should actually go to
http://SERVER/index.php/login
The .htaccess file I’m using is this
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/wiki/index.php$
RewriteCond %{QUERY_STRING} ^title=Special:UserLogin
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteRule ^(.*)$ ../login? [R,L]
</IfModule>
But for some reason, it errors out to
Empty module and/or action after parsing the URL "/local/www/SERVER/web/index.php/login"
Any ideas on what is going wrong? Much appreciated.
Thanks to a coworker, I figured it out, but wanted to post the answer here in case anyone was curious. The .htaccess file was in the wiki folder, which was inside the web folder. the “..” I had in front of /login? was the problem and was sending in back one extra directory. Removing those fixed the problem.