This is the P2PU Archive. If you want the current site, go to www.p2pu.org!

MediaWiki appropiation

My recent threads

You haven't posted any discussions yet.

Recently updated threads

Pretty URLs

Go back to: General discussion
Like I said in the Week 3 forum, I don't know how to shorten/prettify the URL.  Maybe I can get a little help?
My host is iPage (quick and easy installation but low bandwidth).
  • What is root access?
  • How do "ensure I am using Apache and have root access"? - My control panel lists the server as Debian...
  • I don't see httpd.conf anywhere in my FileManager...
  • What is .htaccess?
  • Is .htaccess located within httpd.conf?
If it turns out I don't have root access I followed this link: http://www.mediawiki.org/wiki/Manual:Short_URL/wiki/Page_title_--_no_root_access
but am having trouble with:

"3. Create or edit .htaccess in your web root directory (typically, public_html or htdocs)..."
  • What/where is the web root directory? - Is this different from the "root" in "root access"?
  • I am not seeing either public_html or htdocs - where might they be located and if they don't exist already how would I go about creating them?  What are their necessary contents?
Go ahead and say it - newb!

Thanks!

Enric Senabre Hidalgo's picture
Enric Senabre Hid...
Tue, 2011-02-22 00:23

Hi Jason,

The root is the entry level directory of a website. For example the root directory of the P2PU website is http://p2pu.org/

What worked for me in my Dreamhost account was to simply create the .htaccess file as described in the instructions, then using FTP I uploaded at the root (main directory).

As seen in iPage instructions you should create a FTP user, and when it comes to enter the directory to which the FTP user will have access leave it blank for root access:

http://www.ipage.com/knowledgebase/beta/article.bml?ArticleID=201&type=H...

Jared Brandt's picture
Jared Brandt
Wed, 2011-02-23 18:14

Yeah, when you open up your FTP you are already in your root directory. Root just means base... as far back as you can go.

You won't see a directory -- well, it's possible, but let's ignore it for now -- called "public_html". You are already in it when you sign in to your FTP.

So, all you need to do is either create a file in your root directory called ".htaccess" (without the quotes) or you can create this file on your personal machine and then upload it. Are you running Windows? On Windows, open up Notepad (old school), go to File > Save As, and enter: ".htaccess" (WITH THE QUOTES THIS TIME) into the file name box. This will create the file.

As for the contents of this file, here is what I put in it:

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico

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

</IfModule>

Then, once I had that in the .htaccess file, I added the following to my LocalSettings.php file. I scrolled right to the bottom and simply pasted these lines:

// Pretty URLs
$wgScriptPath = "";
$wgArticlePath = "/$1";
$wgUsePathInfo = true;

And that should be all you need! Please let us know how this goes or if you have any trouble. :)

1 person liked this