I'm sure that those who know better will correct me, but I don't think most search engines care about the difference between
http://mywiki.org/wiki/pagename
and
http://mywiki.org/wiki/index.php/pagename (which works without changing the base installation)
However, some of them don't like:
http://mywiki.org/wiki/index.php?title=pagename
The other benefit of shorter urls is so your users don't have to type as much or remember a long URL (I foolishly named my wiki directory "colipedia" instead of "wiki" or "w") But this can be accomplished with redirecting instead of mod_rewrite. I do it by using a php script instead of html to handle 404 not found errors on my site:
<?php $url = 'http://ecoliwiki.net/colipedia/index.php/'; if (isset($_SERVER['REDIRECT_URL'])){ $url .= basename($_SERVER['REDIRECT_URL']); } if (isset($_SERVER['PATH_INFO'])) $url .= $_SERVER['PATH_INFO']; if (isset($_SERVER['QUERY_STRING'])) $url .= $_SERVER['QUERY_STRING'];
header("Location:$url"); ?>
I save this as error.php in my wiki's base directory and point apache's error handling at it. It seems to work, insofar as sending lots of mangled urls to reasonable pages. Anyone have any thoughts on whether this is better/worse/neutral compared to the usual way? I did this after playing with similar redirection to handle people losing session info due to a combination of parser caching and coming in from .org, .net, and .com domains.
Jim
On Jul 30, 2007, at 9:55 AM, Thomas Dalton wrote:
On 29/07/07, Kristin kristin@traditionalwellness.com wrote:
Thank you, Frederik. Yes, I want to change: http://example.com/wiki/index.php?title=PageTtitle to: http://example.com/wiki/PageTitle
It's easier to have the real folder and the alias with different names. ie. don't have /wiki/ in both urls.
I am a little green with this, but have been advised that "friendly urls" will increase my visibility in the search engines. Does anyone have experience with this? And is there one better way to create "friendly urls" than another, as far as the search engines go?
Done correctly, the fact that they aren't the real urls should be completely transparent to the outside world, so I can't see if making any difference how you do it. Any short url should work just as well as any other.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054