Manual talk:Short URL/Ampersand solution

Jump to navigation Jump to search


This article originally appeared at Manual:Very short URL. Odessaukrain 18:52, 6 October 2007 (UTC)

root access[edit]

I don't believe any of these modifications require root access. It all talks about modifying .htaccess and some of the wiki files, which any user that can access their mediawiki installation should be able to access. Nynexman4464 15:41, 13 October 2007 (UTC)

agree, fixed. --Kenny5 13:31, 30 August 2008 (UTC)


None of these ampersand fixes works for me.

As is (1.13), the delete, history, diff and edit actions all work (i.e., when there is a second ampersand), but not the move action and, most importantly, the page itself won't show. Guido den Broeder 12:13, 26 August 2008 (UTC)

Problem no longer exists?[edit]

I'm running 1.13.x and I don't seem to have any of these ampersand problems. Does this only affect old versions of MediaWiki? -- 22:50, 20 December 2008 (UTC)

You won't have any problems if you're using an alias instead of rewrite rules. This is an Apache problem, so if it's been fixed it's because the bug has been fixed. (The bug's status seems unclear at the moment.) —Emufarmers(T|C) 07:34, 22 December 2008 (UTC)

Help Request On Same Issue[edit]

When I use an url encoded URL and URL canonicalization together, following issue occurs: redirects to (which is corrupted)

As can be seen, Apache server adds extra "25" string nearby the "%". This is explained as an Apache Server bug, I'm not able to correct this with a patch because I'm on a shared hosting. So the only option seems to correct this with a rewrite rule. Would (for example) the following line correct my issue?

RewriteRule ^(.*)\%25(.*)$ $1$2

Regards -- 11:42, 19 January 2009 (UTC)

Another solution[edit]

I'm using MediaWiki 1.15.1, .php5 and and this works for me:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wiki/(.*)\&(.*)$ w/index.php5?title=$1\%26$2
RewriteRule ^wiki/(.*)$ w/index.php5?title=$1 [PT,L,QSA]
RewriteRule ^wiki/*$ wiki/ [L,QSA]
RewriteRule ^/*$ wiki/ [L,QSA]

Cheers, --Till Kraemer 20:13, 12 October 2009 (UTC)

Upgraded my wiki and now page titles with ampersands can't load[edit]

I have tried all the fixes I can find that arn't running a php script because I dont have access enough for that. The additions to .htaacess either do nothing or break my site.

Please help. I have 1.16.2 now...