Getting the masked URL values in Mediawiki

Posted by Kalai on Pro Webmasters See other posts from Pro Webmasters or by Kalai
Published on 2013-06-06T06:48:07Z Indexed on 2013/11/08 16:17 UTC
Read the original article Hit count: 260

Filed under:
|
|
|
|

I have successfully masked the URL in Mediawiki. By using the following scripts in .htaccess and localsettings.php files in Mediawiki, i.e.:

.htaccess:

Options +FollowSymLinks

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)/(.*)$ /mediawiki/index.php?title=$1&actions=$2 [L]

Localsettings.php:

$wgScriptPath       = "/lib/mediawiki";
$wgArticlePath      = "/lib/mediawiki/$1/$2";

It is working fine with required URL. But my problem is I want to consider the second parameter as a querystring for my pages. But I could not get the second parameter in my file. I tried with $wgrequest function but it is only giving the first parameter as title. I tried with $_REQUEST also, it is sometimes give the value of $_REQUEST['actions']. But many times not. I cant understand what is the problem.

© Pro Webmasters or respective owner

Related posts about php

Related posts about apache