Hi.
I am currently implementing the short url into my wiki. It works, however it does not redirect to the wiki url but the index.php file.
Everything is copied from the short url configs.
Thanks in advance.
Hi.
I am currently implementing the short url into my wiki. It works, however it does not redirect to the wiki url but the index.php file.
Everything is copied from the short url configs.
Thanks in advance.
You probably didn't copy everything. For example: Manual:Short URL/Apache#LocalSettings.php
You probably didn't copy everything. For example: Manual:Short URL/Apache#LocalSettings.php
It’s not really helping since I already told you that I copied everything.
The information you provide is not helpful either to figure out what's wrong.
You can start by sharing your configuration, link to your site, etc
Here is the code:
# Enable the rewrite engine
RewriteEngine On
# Short URL for wiki pages
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
# Redirect / to Main Page
RewriteRule ^/*$ %{DOCUMENT_ROOT}/w/index.php [L]
LocalSettings.php:
$wgScriptPath = "/w";
$wgArticlePath = "/wiki/$1";
If you manually type an index.php URL, it won't redirect to a /wiki/ URL.
The configuration purpose is:
Does it work for you as I explained?
Basically, it looks like your rewrite rules are not applied, or %{DOCUMENT_ROOT} points to the wrong location.
Try changing %{DOCUMENT_ROOT}/w/index.php to the full path of index.php (in the filesystem).ç
Also, set up some debugging to see how the rewrite is being done (or if it's being applied at all): https://stackoverflow.com/a/9632952/7268905
There is a error log, which says $wgPasswordSender
and $wgEnableEmail
are undefined and unexpected in that order.
For the first one $wgResourceBasePathki
is undefined. I cant find any reference to it in MediaWiki.
The second one says that the variable is unexpected.
There is a third one where the string “apache” is unexpected, and it expected a closing [.
All lines go to the variables, $wgPasswordSender
to itself, $wgEnableEmail
to $wgEmailAuthentication
, and the Apache to $wgDBserver