[Mediawiki-l] Redirects and such

P. Kerim friedman kerim.mail at oxus.net
Fri Jul 30 20:17:34 UTC 2004


I looked at

http://meta.wikimedia.org/wiki/Talk:Rewrite_rules#Putting_All_Toghether

Again and I changed the following lines accordingly:

$wgScript           = "$wgScriptPath/";
$wgRedirectScript   = "redirect.php";
$wgArticlePath      = "$wgScript$1";

This changed the links as they appear in the wiki, but the new links 
don't work!

"The requested URL /Main_Page was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use 
an ErrorDocument to handle the request. "

It seems that .htaccess still has no effect whatsoever. I tried the 
same thing on my local system (running on my laptop on localhost) and 
the same thing - no changes!!! I made sure that http.conf allowed 
overrides, so this isn't the problem.

Why isn't this working?

One other thing I found is that the original mediawiki page:

http://meta.wikimedia.org/wiki/Rewrite_rules

Said I should have this at the start of my file:

# Allow wiki articles to start with a period
<Files .*>
Order Deny,Allow
Allow From All
</Files>

It wasn't in Alisson's original e-mail, so I hadn't added it. However, 
it *still* doesn't seem to work. Either on localhost or on my server...

kerim

On Jul 29, 2004, at 9:20 AM, P. Kerim friedman wrote:

> One thing that is bugging me about not getting the rewrite rules 
> working is that the instructions for the LocalSettings.php file don't 
> seem to match what mine looks like (in Beta 5). Do I need to change 
> them? Below is what they look like now.
>
> Thanks,
>
> kerim
>
> $wgSitename         = "KerimWiki";
> $wgScriptPath	    = "";
> $wgScript           = "$wgScriptPath/index.php";
> $wgRedirectScript   = "$wgScriptPath/redirect.php";
>
> ## If using PHP as a CGI module, use the ugly URLs
> $wgArticlePath      = "$wgScript/$1";
> # $wgArticlePath      = "$wgScript?title=$1";
>
> $wgStylePath        = "$wgScriptPath/stylesheets";
> $wgStyleDirectory   = "$IP/stylesheets";
> $wgLogo             = "$wgStylePath/images/wiki.png";
>
> $wgUploadPath       = "$wgScriptPath/images";
> $wgUploadDirectory  = "$IP/images";
>
> On Jul 27, 2004, at 4:15 PM, Alisson Sellaro wrote:
>
>> P. Kerim friedman wrote:
>>
>>>
>>> I really hope I can get this working, as it is the only thing 
>>> holding  up making my site go live! Thanks again to anyone who can 
>>> clear up the  confusion!
>>
>> That setup was used when MusicWiki was in a different server (under 
>> /wiki directory). My actuall configuration follows (Wiki at 
>> http://www.music-wiki.org for .htaccess or httpd.conf):
>>
>> RewriteEngine on
>> RewriteCond %{QUERY_STRING} ^$
>> RewriteCond %{REQUEST_URI} ^/$
>> RewriteRule ^(.*) /index.php?tile=Main_Page [L]
>>
>> # Don't rewrite requests for files in MediaWiki subdirectories,
>> # MediaWiki PHP files, HTTP error documents, favicon.ico, or 
>> robots.txt
>> RewriteCond %{REQUEST_URI} !^/stylesheets/
>> RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php
>> RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html
>> RewriteCond %{REQUEST_URI} !^/favicon.ico
>> RewriteCond %{REQUEST_URI} !^/robots.txt
>>
>> # Make sure there is no query string (Unless user is making a search)
>> RewriteCond %{QUERY_STRING} ^$ [OR]
>> RewriteCond %{REQUEST_URI} ^/Special:Search
>>
>> # Rewrite http://wiki.domain.tld/article properly, this is the main 
>> rule
>> RewriteRule ^/(.*) /index.php/$1 [L]
>>
>> I think the following configuration will fit your needs (changing 
>> http://something.org to http://some.org and doing URL 
>> "beautification"):
>>
>> RewriteEngine on
>> # Change http://something.org to http://some.org
>> RewriteCond %{REQIEST_URI} ^something.org
>> RewriteRule ^(.*) some.org$1
>>
>> # Main_Page not specified
>> RewriteCond %{QUERY_STRING} ^$
>> RewriteCond %{REQUEST_URI} ^/$
>> RewriteRule ^(.*) /index.php?tile=Main_Page [L]
>>
>> # Don't rewrite requests for files in MediaWiki subdirectories,
>> # MediaWiki PHP files, HTTP error documents, favicon.ico, or 
>> robots.txt
>> RewriteCond %{REQUEST_URI} !^/stylesheets/
>> RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php
>> RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html
>> RewriteCond %{REQUEST_URI} !^/favicon.ico
>> RewriteCond %{REQUEST_URI} !^/robots.txt
>>
>> # Make sure there is no query string (Unless user is making a search)
>> RewriteCond %{QUERY_STRING} ^$ [OR]
>> RewriteCond %{REQUEST_URI} ^/Special:Search
>>
>> # Rewrite http://wiki.domain.tld/article properly, this is the main 
>> rule
>> RewriteRule ^/(.*) /index.php/$1 [L]
>>
>> Hope it helps.
>>
>> -- 
>> Alisson Sellaro
>>
>> MusicWiki   :: http://www.music-wiki.org
>> Plug It In! :: http://www.plugitin.com.br
>>
>> AIM   : sellaropelucio
>> ICQ   : 150658836
>> Jabber: sellaro at jabber.linux.it
>> MSN   : alissonsellaro at hotmail.com
>>
>> _______________________________________________
>> MediaWiki-l mailing list
>> MediaWiki-l at Wikimedia.org
>> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>




More information about the MediaWiki-l mailing list