Thread:Project:Support desk/Short URL with Host Gator/reply (5)

Try this. This is some sort of a brain wrecking hack. But it should work. (Tested on Hostgator)

1. Install Mediawiki in public_html/wiki 2. In public_html, create a .htaccess and add this content

=Goes into root htaccess= RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?Yoursite.com$ RewriteRule ^(/)?$ wiki [L]

RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^wiki/(.*)$ ./wiki/index.php?title=$1 [PT,L,QSA]

=Goes to localsetting= $wgScriptPath = "/wiki"; $wgArticlePath = "$wgScriptPath/$1";

So the first block of htaccess code makes main site redirect to a sub-folder in that site so if you enter yourdomain.com, the link will read yourdomain.com/wiki then, next block of code actually does the url shortening the lovalsetting part is what everyone know to do.