Topic on Project:Support desk

Error Style not displaying after removing index.php

7
Summary by SamiWey

Thanks for all

SamiWey (talkcontribs)

mediawiki 1.34

.htaccess

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

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]

localsettings.php

 ## The URL base path to the directory containing the wiki;
 ##  defaults for all runtime URL paths are based off of this.
 ##  For more information on customizing the URLs please see: 

 ##  http://www.mediawiki.org/wiki/Manual:Short_URL  

 $wgScriptPath = ""; 

 $wgScriptExtension = ".php"; 

 $wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;
Malyacko (talkcontribs)

@SamiWey You posted stuff from files but did not explain what the problem is. Or if you have some question. Or where to see a problem.

Ciencia Al Poder (talkcontribs)

$wgScriptPath probably needs to be "/" instead of "" Nope, empty string is fine for this setting.

The configuration looks fine.

Hit the F12 key, select the network tab, and reload the page. Look at requests to the load.php URL and see if some of them return 5XX or 4XX status codes, open them and see if there's any error there.

SamiWey (talkcontribs)
SamiWey (talkcontribs)

this appears in console

  1. Refused to apply style from 'https://www.wiki.org/wiki/public_html/load.php?lang=es&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cskins.vector.styles&only=styles&skin=vector' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
  2. Página_principal:12 GET https://www.wiki.org/wiki/public_html/load.php?lang=es&modules=startup&only=scripts&raw=1&skin=vector net::ERR_ABORTED 404
Ciencia Al Poder (talkcontribs)

Is your wiki accessible under the URL /wiki/public_html/ ?

SamiWey (talkcontribs)

nop in the url w/ are all of the files