gusl: (Default)
[personal profile] gusl
I am annoyed enough at MediaWiki that I'm willing to pay a professional to fix this for me.

Ideally, URLs would look like http://www.optimizelife.com/wiki/Main_Page

SiteGround's installation scripts gave me: http://www.optimizelife.com/wiki/index.php/Main_Page

Changing hosts and installing by hand (with kind help from ehuber) made the URL even worse: http://optimizelife.nfshost.com/wiki/index.php/Main_Page

http://www.mediawiki.org/wiki/Manual:Short_URL has been failing me.

---

I'm not optimistic about being able to restore the wikidb. So at some point, I should make "keyboard+mouse scripts" for backup / restore into text files ("click on Edit, copy the wikitext, paste onto Notepad, etc"). Any idea how to do that?

(no subject)

Date: 2008-03-24 11:40 pm (UTC)
From: [identity profile] gwillen.livejournal.com
To get rid of the /index.php/, you need to convince your webserver that index.php, like index.html, is an index page. This is something you can do (for Apache) in httpd.conf (and friends), or if you don't run the server, in .htaccess (sometimes).

Let me know if you want more details.

(no subject)

Date: 2008-03-25 12:36 am (UTC)
From: (Anonymous)
I'm writing this from a tablet PC, which is pretty sweet.

I don't know if I run the server. I am using nearlyfreespeech.net

the "short URL" link also advises changing the .htaccess along with editing the LocalSettings.php to change the links inside the wiki accordingly. But one of the above causes the wiki pages to be inaccessible.

(no subject)

Date: 2008-03-25 12:57 am (UTC)
From: [identity profile] gwillen.livejournal.com
I don't know if I run the server.

Then you don't. :-)

But one of the above causes the wiki pages to be inaccessible.

Hm. What kind of error do you get? I would suggest that you _first_ change just the .htaccess, and see what happens. That should allow you to access the pages at the short URLs, without breaking the long URLs. If that works, then you can try changing LocalSettings to use only the short URLs.

(no subject)

Date: 2008-03-25 02:40 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
So I created the .htaccess as:
RewriteEngine On
RewriteRule ^[^:]*\. - [L]
RewriteRule ^[^:]*\/ - [L]
RewriteRule ^/*$ /wiki/index.php?title=Main_Page [L,QSA]
RewriteRule ^(.+)$ /wiki/index.php?title=$1 [L,QSA]


and yet http://www.optimizelife.com/wiki/ToDo does not work.
http://optimizelife.nfshost.com/wiki/ToDo also does not work.

(no subject)

Date: 2008-03-25 04:03 am (UTC)
From: [identity profile] gwillen.livejournal.com
Hm. The thing I was going to suggest putting into .htaccess was much shorter than that, but also appears not to work; as it appears you already have it, but all it does is give you URLs like

http://www.optimizelife.com/wiki/?Main_Page

with the excess question-mark, and doesn't help URLs without that question-mark.

I don't really understand the rewrite rules well enough to do anything with them...

(no subject)

Date: 2008-03-26 12:28 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
I noticed today that my homepage had become my wiki home!

and while http://www.optimizelife.com/wiki/ToDo does not work,
http://www.optimizelife.com/ToDo does... which is even shorter(!) but not desired.

I tried to fix this by modifying the rules to:
RewriteRule ^/*$/wiki /wiki/index.php?title=Main_Page [L,QSA]
RewriteRule ^(.+)$/wiki /wiki/index.php?title=$1 [L,QSA]

but this failed.

SUCCESS!

Date: 2008-03-26 12:42 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
for the record:

.htaccess in htdocs (or public_html):
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wiki/(.*)$ wiki/index.php?title=$1 [PT,L,QSA]
RewriteRule ^wiki/*$ wiki/ [L,QSA]
RewriteRule ^/*$ wiki/ [L,QSA]



wiki/LocalSettings.php:
$wgArticlePath = "/wiki/$1";

Re: SUCCESS!

Date: 2008-03-26 12:54 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
with .htaccess being
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wiki/(.*)$ wiki/index.php?title=$1 [PT,L,QSA]
RewriteRule ^wiki/*$ wiki/index.php?title=Main_Page [PT,L,QSA]



http://www.optimizelife.com/wiki/Main_Page works

but

http://www.optimizelife.com/wiki/ works gets redirected to http://optimizelife.nfshost.com/wiki/Main_Page

fixed, by adding

Date: 2008-03-26 02:37 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
$wgServer           = "http://www.optimizelife.com";

Summarizing, how I got a SHORT URL

Date: 2008-03-26 02:48 am (UTC)
From: [identity profile] gustavolacerda.livejournal.com
(1) .htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wiki/(.+)$ wiki/index.php?title=$1 [PT,L,QSA]


(2) in LocalSettings.php:
$wgArticlePath = "/wiki/$1";


(3) in LocalSettings.php:
$wgServer           = "http://www.optimizelife.com";


(4) Now, editing pages is broken. You will see "Editing Index.php" instead of "Editing ToDo". Here is the fix:
$wgUsePathInfo = false; 
Edited Date: 2008-03-26 02:58 am (UTC)

February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags