Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 2 of 2

Thread: Rewriting URLs

  1. #1
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default Rewriting URLs

    'sup,

    So can anyone help with rewrite rules here? I have a MediaWiki install in the root of the web directory and am trying to get the URLs to look 'pretty'. So far I have http://wiki.example.com/index.php/Main_Page but I want to get rid of the index.php part, so it just looks like http://wiki.example.com/Main_Page.

    .htaccess:
    Code:
    RewriteEngine On
    RewriteRule ^[^:]*\. - [L]
    RewriteRule ^[^:]*\/ - [L]
    RewriteRule ^/*$ /index.php?title=Main_Page [L,QSA]
    RewriteRule ^(.+)$ /index.php?title=$1 [L,QSA]
    LocalSettings.php
    Code:
    $wgScriptPath = "";
    $wgScriptExtension = ".php";
    $wgUsePathInfo = true;

    Thanks
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  2. #2
    Join Date
    Sep 2010
    Location
    Derbyshire
    Posts
    3,442
    Tokens
    683
    Habbo
    Zuth

    Latest Awards:

    Default

    Its a good job I was looking for extensions for the HabboxWiki earlier and came across this: (I know its not an extension)

    http://www.mediawiki.org/wiki/Manual:Short_URL

    Defaults
    MediaWiki's default installation path usually looks something like this:
    /var/www/localhost/htdocs/mediawiki/w (installed as root user)
    /home/johndoe/public_html/mediawiki/w (installed with a shared hosting provider)
    MediaWiki's default page addresses looks like these examples:
    http://example.com/w/index.php/Page_title (recent versions of MediaWiki, unless using CGI)
    http://example.com/w/index.php?title=Page_title (recent versions of MediaWiki, using CGI)
    Using the methods below, short webpage addresses can be changed to addresses such as these:
    http://example.com/wiki/Page_title (this is the standard, same as in Wikipedia)
    http://wiki.example.com/Page_title (not recommended!)
    Hope it helps

    RIP Grandad - Click here to see my Dads Subaru Impreza WRX STI in action!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •