2

I am using a basic hosting plan on Host Gator. I installed MediaWiki and I am getting URLs with index.php?title= in it, i.e. www.domain.com/index.php?title=Main_Page

I want to remove the index.php?title= part and just have the title of the page appear. I am following the instructions from http://www.mediawiki.org/wiki/Manual:Short_URL/Page_title_--_Windows_%26_Apache_without_403_on_Special_Pages, not sure if this is the right instructions I should be using.

Step 1 of the instructions indicate that "If you have vHosts configured, insert the following Rewrite directives into the appropriate <VirtualHost> directive. Otherwise, insert it in the <directory> directive for your wiki's root directory:" and to insert:

RewriteEngine On    
RewriteRule ^/(.*):(.*) /index.php/$1:$2

Where is the <directory> directive located? What file should I be inserting the code into?

1 Answer 1

4

The <directory> block is a httpd.conf Apache configuration file directive.

On a shared hosting enviroment, you don't generally have directly access to his file. You still have access to an .htaccess file, which allows most configuration directives to be used.

Create a .htaccess at your web root (the same directory you have index.php and LocalSettings.php) and write the RewriteEngine / RewriteRules directives in this file.

If this fails, follow instead this guide, more adapted to your situation: http://www.mediawiki.org/wiki/Manual:Short_URL/Apache

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.