Special characters (+ symbole) in url

Jump to: navigation, search

How can I overcome the problem of "+" character in my url? I'm trying to request the articles that contain "+" symboles like mathematical titled expressions: A+B=C, but it doesn't work on my site (it was working but I don't know what happened lately).

Instead the "+" is treated as a space " " which is then translated by the wiki as "_" and the result of A+B=C becomes A B=C.

I'm using short urls. Can you help me?

Almuhammedi (talk)11:27, 23 May 2012

You should use {{urlencode:+}} whenever you must have a plus sign ("+") or other restricted character. (See Help:Magic words#URL data) That said if you can move the pages you should.

Allen4names (talk)15:56, 23 May 2012

Thanks for reply. I'm not sure if this can resolve my problem but everything was perfect since the time I installed my website until few days ago when I realized that the pages containing this character were not able to be called any longer. I'm sure I created them and was calling them from time to time. Now I can create a page but can not call it. To make things clear,

But my site is with short URL and so all my links are called this way. So how can I solve it?

You can see that Mediawiki doesn't have this problem here.

I feel that something done at the hosting server (example changed the redirecting rules in the Apache). I called their help but they couldn't resolve it.

Almuhammedi (talk)19:02, 23 May 2012

You should find someone familier with that language as I can't even identify it.

Allen4names (talk)05:08, 24 May 2012
 
 

Thanks all for your support. I think I could resolve the problem now, just to share it in case anyone faces it again. There is an option, $wgUsePathInfo that can be set in LocalSettings.php. This problem arises when dealing with short URLs and to fix it, add the following line to your LocalSettings.php

$wgUsePathInfo = true;        # Enable use of pretty URLs
Almuhammedi (talk)16:05, 7 August 2012

Note $wgUsePathInfo should be auto-detected based on if your webserver supports it (or at least I thought it was. Maybe that has changed, maybe our auto-detection is just crappy). I'm kind of surprised that changing it has any affect in this situation.

I believe this issue can also sometimes be caused by using the wrong flags in a rewriteRule clause in a .htaccess file.

Bawolff (talk)17:00, 7 August 2012

You may be right, Bawolff and I might mistakenly removed that someday because it was working fine before. But I can assure it fixed the problem that partially originated from rewriteRule of course.

Almuhammedi (talk)02:31, 8 August 2012