Manual talk:Short URL/sub directory/wiki/Page Title -- .htaccess

leaves "index.php" in call...
not sure why. on MAMP - latest version for MAC OS X... still trouble shooting...

can't get this to work
Running on HostGator with MW 1.13.3.

I can't seem to get this to work. My wiki software is actually located in example.com/dir1/wikisoftware and I am trying to shorten the url to example.com/dir1/wiki - I can't seem to be able to do this using these instructions, but I can shorten it to example.com/wiki without any issues whatsoever.

I'm not sure if this is a limitation of HostGator's Apache implementation or if I am doing something wrong, but that's how it works out for me....


 * seems this code expects the .htaccess file to be in the root. If it is in the wikimedia directory then try this:

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^wiki/(.*)$ /dir1/wikisoftware/index.php?title=$1 [NC,L]

Chris

can't get this to work - fixed
Chris example didn't worked out for me. This is the solution I found with .htaccess in the wiki folder:

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

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

Nikolay


 * Thanks Nikolay - your solution worked for me. I'll add that the LocalSettings.php also need modifications, to
 * $wgScriptPath = "/music";
 * $wgArticlePath = "$wgScriptPath/$1";
 * That is, removing the /wiki as suggested on the main page.
 * Jon

where do I find public_html directory
where do I find this public_html directory? as far as .htaccess file is concerned I found a number of them in my mediawiki installed path. ./var/www/mediawiki/math/.htaccess ./var/www/mediawiki/maintenance/archives/.htaccess ./var/www/mediawiki/maintenance/.htaccess ./var/www/mediawiki/languages/.htaccess ./var/www/mediawiki/tests/.htaccess ./var/www/mediawiki/serialized/.htaccess ./var/www/mediawiki/includes/.htaccess ./var/www/mediawiki/t/.htaccess

Which of these have I to edit?

~ Sangeeth Keeriyadath


 * public_html is a convention; in your case, the Web root will be /var/www. —Emufarmers(T 21:19, 2 June 2009 (UTC)

Help configuring the short URLs ||
Hi,

my website is http://www.italien.ch

i'd like that 3 different URLs for the article:


 * http://www.italien.ch/de/Sandbox   (main path)
 * http://www.italien.ch/wiki/Sandbox
 * http://www.italien.ch/de/wiki/Sandbox

How do I that?

thanks

This worked for me
Rather than... RewriteRule ^wiki/(.*)$ w/index.php?title=$1 [PT,L,QSA] RewriteRule ^wiki/*$ w/index.php [L,QSA] RewriteRule ^wiki$ w/index.php [L,QSA]

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

Like the example, my wiki is in a folder called wiki and not in public_html i.e. public_html/some_folder/wiki