1

i want to remove index.php from mediawiki url. After that i can't access to main page.

What i did:

  1. Add to LocalSettings.php following lines:

    $wgScriptPath = "/mediawiki";

    $wgArticlePath = "/wiki/$1";

    $wgUsePathInfo = true;

  2. Created .htaccess:

    Enable the rewrite engine

    RewriteEngine On

    Short URL for wiki pages

    RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]

    Redirect / to Main Page

    RewriteRule ^/*$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]

And created alias in apache conf, if i go to / apache redirecting to /wiki/. After make that changes when i enter on localhost/ i've got localhost/Strona_główna - this is in polish - and below error:

Not Found

The requested URL /wiki/Strona_główna was not found on this server.

Before, when the index.php was appearing i've been having url like this: localhost/wiki/index.php/Strona_główa and that was working.

I think is something wrong with character settings, but i don't knowe where i supposed to search resolve.

4

0 回答 0