Rick DeNatale wrote:
On 6/16/05, Brion Vibber brion@pobox.com wrote:
#$wgStylePath = "{$wgScriptPath}/skins"; #Basing style on script hides skins??? $wgStylePath = "/wiki/skins";
I'm not sure I understand why this bit is done.
Because DefaultSettings.php says that If $wgScriptPath is localized then anything based on it has to be localized.
This is already done in the default LocalSettings.php boilerplate produced by the installer. Normally you do not need to change any of those definitions except $IP, $wgScriptPath, and $wgArticlePath.
As I tried to explain in the comment, If I follow this pattern and set $wgStylePath = "{$wgScriptPath}/skins" where $wgScriptPath = "/w" for some reason, Apache doesn't seem to serve up the css files, so I end up with no tabs, sidebar etc.
You probably should look into that; mysterious problems in an alias / rewrite config are likely to, well, cause mysterious problems.
In what _way_ are they not served? 404? 403? 500? Segfault? Can you confirm that the path was correct, and that that path was actually being used? Always clear caches, etc when testing this stuff.
## If using PHP as a CGI module, use the ugly URLs #$wgArticlePath = "$wgScript/$1"; #$wgArticlePath = "$wgScript?title=$1"; $wgArticlePath = "/wiki/$1";
Unless you've made some other configuration on the web server, this would appear to break all article URLs, because they'd be aliased to files as /var/www/html/w/$1.
As I said I'm using rewrite, which was already working, here are the rewrite rules, right now these are in /var/www/html/w/.htaccess:
RewriteEngine on # Don't rewrite requests for files in MediaWiki subdirectories, # MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt RewriteCond %{REQUEST_URI} !^/wiki/(stylesheets|images|skins)/ RewriteCond %{REQUEST_URI} !^/wiki/(redirect|texvc|index).php RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html RewriteCond %{REQUEST_URI} !^/favicon.ico RewriteCond %{REQUEST_URI} !^/robots.txt
# Rewrite any article as wiki/index.php/article and stop RewriteRule ^(.*)$ /wiki/index.php?title=$1 [L,QSA]
That's kind of odd... Why's it in the w subdirectory if that's where you _don't_ want things rewritten? It looks like this could be causing your style breakage, since you're using a strange system where you except certain hardcoded URLs (which won't match, being in /w/ not /wiki/) and then shove anything and everything else through a rewrite.
I would strongly recommend removing the Alias definitions and all those rewrite rules and replacing them with something straightforward like:
RewriteRule ^/wiki/(.*)$ /w/index.php?title=$1 [L,QSA]
Or alternatively a single Alias such as this might work, using the PATH_INFO supplement for the page title:
Alias /wiki /var/www/html/w/index.php
-- brion vibber (brion @ pobox.com)