Topic on Project:Support desk

[RESOLVED] Accidentally deleted .htaccess(?), now can't access wiki

6
50.137.113.187 (talkcontribs)

My wiki is (or was) at http://www.ilaisu.org/wiki/Main_Page. Unrelated to the wiki, my wife added a directory at http://www.ilaisu.org/pv/, and attempted to password protect it using .htaccess and .htpasswd files. Whatever way she tried to do it did not work, and the entire domain was no longer accessible (putting in the username and password just gave an error). So she tried to fix it by deleting the whole directory and the files she added, and now although the domain is accessible and she says she did not delete anything out of the /w/ directory the wiki files are stored in, the wiki comes up 404. I'm guessing she deleted the .htaccess file for the wiki.

Although I configured the wiki myself, it was a long time ago, and even at the time I was not an expert, I was just following directions without really understanding them. Is there some kind of basic or default .htaccess file I can use to at least be able to access the wiki again, if not get back any configuration I may have done? Thanks.

88.130.80.92 (talkcontribs)

Hi!

Just that you don't tell me later I had not told you: If you or your hoster have a backup somewhere: This is the time to request it! Everything else will be more difficult.

I found the central index.php file at http://www.ilaisu.org/w/index.php. Your wiki basically is still working, see e.g. http://ilaisu.org/w/index.php?title=Special:Version Calling just index.php gives a redirect to http://ilaisu.org/wiki/Main_Page

Since your URLs look like that, you obviously had short URLs configured accordingly. The information you need to do that are exactly here.

86.159.26.136 (talkcontribs)

Well just recreate a blank .htaccess and just add this to it RewriteEngine on RewriteRule ^wiki/(.*)$ /main/index.php?title=$1 [L,QSA]

Where it says main is where you put the extension like if you just put it in public_html then you remove it and it looks like this

RewriteEngine on RewriteRule ^wiki/(.*)$ /index.php?title=$1 [L,QSA]

For example wikipedia created the /w directory so if you save it there then you would put w

86.159.26.136 (talkcontribs)

Also you could upgrade your wiki to Mediawiki version 1.21.1

50.137.113.187 (talkcontribs)

Thank you for the quick reply. Now that I see the short URL instructions I do remember configuring that, it was just so long ago I couldn't even remember where to start looking. I've got my new .htaccess and everything is working just as before. Thanks again!

88.130.80.92 (talkcontribs)

That's fine!

One of the next things you should think of is doing an upgrade. All information are here: Upgrade. And don't forget to make a backup first. :-)

Reply to "[RESOLVED] Accidentally deleted .htaccess(?), now can't access wiki"