Thread:Project:Support desk/Remove old subdirectory from URL

Hey all,

I have complete updated a site that is a mediawiki site. The URL used to be domain.com/wiki but now it is just domain.com since that what it is by definition.

Here is the current rewrite to make the URL's more SEO friendly:

NGINX:

location @friendly_url { rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last; } location / { try_files $uri $uri/ @friendly_url; } There is also this added in the LocalSettings.php file: $wgScriptPath = ""; $wgArticlePath     = "/$1"; $wgUsePathInfo     = true; $wgScriptExtension = ".php"; The problem is that there may still be some people with bookmarks and I just want to strip out the "wiki" part of the url they may still have. I have tried editing the "@friendly_url" to this: rewrite ^/[wiki/?]?([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last; NOTE** the spot with "wiki" I added.
 * 1) Added for Freindly URLS ## START ##
 * 1) Added for Freindly URLS ## END ##

But it didn't seem to make any difference. If I try wiki after the domain, it tries to pull up a wikipage titled wiki. Would anyone have a good idea on how to handle this?

Thanks, -Bill