Right now, I'm using the following working rewriting rules for my SouthernApproachWiki (http://www.southernapproach.ch/wiki/), however, they are sometimes slow and might contain errors. Google for example hasn't indexed my wiki so far, most likely because of the rewriting rules.
My wiki is located in http://www.southernapproach.ch/wiki/.
== .htaccess ==
RewriteEngine on RewriteBase / RewriteRule ^wiki$ /wiki/index.php [L] RewriteCond %{REQUEST_URI} !^/wiki$ RewriteCond %{REQUEST_URI} !^/wiki/(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 RewriteRule ^(.*)$ /wiki/index.php?title=$1 [L,QSA]
== LocalSettings.php ==
$wgSitename = "SouthernApproachWiki"; $wgServer = "http://www.southernapproach.ch"; $wgScriptPath = "/wiki"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php"; $wgArticlePath = "$wgScriptPath/$1";
Martin
On 16 Feb 2005, at 08:33, Martin Steiger wrote:
Right now, I'm using the following working rewriting rules...
Is there any particular reason you used RewriteRules instead of Alias?
I'm more comfortable with the Alias approach, and it seems to be working fine. I implemented both it and RewriteRules and timed both. With five trials each, throwing out the outliers and averaging the middle three, Alias was 15% faster. (Obviously not a scientific or exhaustive benchmark -- YMMV.)
http://www.IslandSeeds.org/wiki (This is a 350Mhz machine, so have some patience... :-)
:::: Base 8 is just like base 10, if you are missing two fingers. - Tom Lehrer :::: Jan Steinman http://www.Bytesmiths.com/Item/003AA08
Quoting Jan Steinman, from the post of Wed, 16 Feb:
On 16 Feb 2005, at 08:33, Martin Steiger wrote:
Right now, I'm using the following working rewriting rules...
Is there any particular reason you used RewriteRules instead of Alias?
well, the point is having a url like /wiki/PageName rather than /wiki/index.php?title=PageName
which is what Rewrite does and Alias does not.
On 16 Feb 2005, at 10:38, Ira Abramov wrote:
Quoting Jan Steinman, from the post of Wed, 16 Feb:
On 16 Feb 2005, at 08:33, Martin Steiger wrote:
Right now, I'm using the following working rewriting rules...
Is there any particular reason you used RewriteRules instead of Alias?
well, the point is having a url like /wiki/PageName rather than /wiki/index.php?title=PageName
which is what Rewrite does and Alias does not.
Alias is doing exactly that on my site right now. Or is it my imagination?
http://www.IslandSeeds.org/wiki/Main_Page
comes via:
Alias /wiki/stylesheets /[path to website]/IslandSeeds/wiki/stylesheets Alias /wiki/style /[path to website]/IslandSeeds/wiki/style Alias /wiki/images /[path to website]/IslandSeeds/wiki/images Alias /wiki/skins /[path to website]/IslandSeeds/wiki/skins Alias /wiki/redirect.php /[path to website]/IslandSeeds/wiki/redirect.php Alias /wiki/textvc.php /[path to website]/IslandSeeds/wiki/textvc.php Alias /wiki/index.php /[path to website]/IslandSeeds/wiki/index.php Alias /wiki /[path to website]/IslandSeeds/wiki/index.php
Try it, you'll like it!
:::: An artist can look at a pretty girl and see the old woman she will become. A better artist can look at an old woman and see the pretty girl she used to be. A great artist can look at an old woman, portray her exactly as she is, and force the viewer to see the pretty girl she used to be, more than that, he can make anyone with the sensitivity of an armadillo see that this lovely young girl is still alive, prisoned inside her ruined body. He can make you feel the quiet endless tragedy that there was never a girl born who ever grew older than eighteen in her heart. -- Robert Heinlein :::: Jan Steinman http://www.Bytesmiths.com/Item/915908
Quoting Jan Steinman, from the post of Wed, 16 Feb:
Alias is doing exactly that on my site right now. Or is it my imagination?
donno. this doesn't simply settle with what I know about Apache's Alias directive unless some other trick is afoot (like redirect in the .htaccess file rather than in the server config or vice versa?)
Alias /wiki /[path to website]/IslandSeeds/wiki/index.php
I'll have to try that one... perhapts that's what I missed... I guess the code looks also at the PATH_INFO environment var, rather than only the GET path. that would indeed solve some of the mystery.
is this method mentioned in META? I'll try it tomorrow. if it works, it's certainly lighter on resources than with the rewrite engine...
On 16 Feb 2005, at 14:43, Ira Abramov wrote:
Quoting Jan Steinman, from the post of Wed, 16 Feb:
Alias is doing exactly that on my site right now. Or is it my imagination?
donno. this doesn't simply settle with what I know about Apache's Alias directive unless some other trick is afoot (like redirect in the .htaccess file rather than in the server config or vice versa?)
Well, you DO have to change LocalSettings.php to make /wiki/Article_name legal.
:::: A nation that continues year after year to spend more money on military defense than on programs of social uplift is approaching spiritual doom. Martin Luther King, Jr. :::: Jan Steinman http://www.Bytesmiths.com/Item/003AA15
"Martin" == Martin Steiger southernapproachwiki@gmail.com writes:
Right now, I'm using the following working rewriting rules for my SouthernApproachWiki (http://www.southernapproach.ch/wiki/), however, they are sometimes slow and might contain errors. Google for example hasn't indexed my wiki so far, most likely because of the rewriting rules.
More likely because of a missing robots.txt:
$wget http://www.southernapproach.ch/wiki/robots.txt --18:33:18-- http://www.southernapproach.ch/wiki/robots.txt => `robots.txt' Resolving www.southernapproach.ch... 217.26.52.26 Connecting to www.southernapproach.ch[217.26.52.26]:80... connected. HTTP request sent, awaiting response... 301 Location: http://www.southernapproach.ch/wiki/Robots.txt [following] --18:33:19-- http://www.southernapproach.ch/wiki/Robots.txt => `Robots.txt'
As you can see, there's no valid robots.txt, and what gets served instead is maybe enough to confuse the bot.
If, on the other hand this is not the problem, and you in fact have made Google aware of your wikis existance, the next potential problem is that your oldest article is from 3. Jan 2005. It is not unusual for Google to delay listing for a few months.
You may also want to link to your Wiki from a few places, just to speed things up a bit. A logical place would be [[meta:Sites using MediaWiki]]
mediawiki-l@lists.wikimedia.org