User talk:Alexia E. Smith

Short URL Pages
Alexia, MediaWiki handles routing of paths to pages internally using REQUEST_URI. Including a ?title=$1 inside of a rewrite overrides MediaWiki's internal correct handling of urls. And in the case of webservers with broken query escaping code like Apache can result in titles such as those including pluses and ampersands breaking. But either way it's incorrect when path routing in core is getting more complex and moving towards internal support for 404 handling, routing different types of url patterns, etc...

All the old short url guides were written without a complete knowledge of rewrites and how MediaWiki handles urls. With the same mistakes being repeated over and over. The large collection of guides is also very unfriendly towards users trying to get short urls working. New manual pages with the proper ways to setup short URLs are being written to replace all the old guides, with notes on all the edge cases included. And that knowledge is being put into a tool to generate full short URL configs based on various bits of information. The plan is to build up enough canonical information about short URL configuration for a future version of MediaWiki to have short URL configuration handling built into the installer so everyone can easily have it.

Btw, the Nginx manuals explicitly state not to use if to test for file existence: http://wiki.nginx.org/Pitfalls#Check_IF_File_Exists Daniel Friesen (Dantman) (talk) 04:14, 4 April 2013 (UTC)


 * I have a complete knowledge of how Mediawiki handles URLs and did when that NGINX configuration was created. It does not break URL handling and issues with special characters are non-existent.  For NGINX I could change the redirect to "rewrite ^/([^?]*)? /index.php/$1".  That should work the same, but I have not personally tested it.  This short URL setup has also been tested on Apache on Linux for the same issues.
 * Using NGINX's if directive is fine. "Using if to ensure a file exists is horrible. It's mean."  It just says it is horrible, but with no quantifiable reason.  "Just Because" is not a real reason.  The if directive simply gives more flexibility for file handling.  You could have linked to  instead, but that just also says using rewrites inside an if directive inside a location is fine for now.  The current configuration shown does work and more importantly does work with version of NGINX before 0.7.27.(Those people really should upgrade though due to security flaws.)  The internal NGINX configuration in use at Gamepedia is newer, does use try_files in cases where it makes sense, but does breaks backwards compatibility.  The base NGINX configuration provided in the manual page should get anyone started to setting their wiki up on NGINX and still give them flexibility for tailoring it to their environment.
 * Alexia E. Smith (talk) 05:20, 4 April 2013 (UTC)