# 400 Bad Request errors on a MediaWiki configured to use images from Wikimedia Commons

**URL:** <https://www.ruby-forum.com/t/400-bad-request-errors-on-a-mediawiki-configured-to-use-images-from-wikimedia-commons/191526>\
**Category:** NGINX\
**Created:** [July 13, 2010, 11:02pm UTC](https://www.ruby-forum.com/t/400-bad-request-errors-on-a-mediawiki-configured-to-use-images-from-wikimedia-commons/191526 "2010-07-13T23:02:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brandon\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/74df32/32.png) [@Brandon\_A](https://www.ruby-forum.com/u/Brandon_A)\
**Post date:** [July 13, 2010, 11:02pm UTC](https://www.ruby-forum.com/t/400-bad-request-errors-on-a-mediawiki-configured-to-use-images-from-wikimedia-commons/191526/1 "2010-07-13T23:02:34Z")

</div>

First of all, I’m using nginx 0.8.45 and have a wiki on my website  
that’s configured to use images off of Wikimedia Commons. It saves the  
images onto my server and updates them at regular intervals. Most of  
these images show up fine, however, images that contain in their names  
things like % or anyother characters that aren’t used often in file  
names give 400 Bad Request errors. Here’s an example of what I’m taking  
about:  
[http://urcreative.hobby-site.com/wiki/images/thumb/3/34/25%.svg/9px-25%.svg.png](http://urcreative.hobby-site.com/wiki/images/thumb/3/34/25%25.svg/9px-25%25.svg.png)

Its really annoying and if anyone has a fix for this problem, please  
tell me.

–  
omega13a  
Owner and Founder of UFT  
[http://www.fedtrek.com](http://www.fedtrek.com)

---

<div class="post-metadata">

**Author:** ![Brandon\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/74df32/32.png) [@Brandon\_A](https://www.ruby-forum.com/u/Brandon_A)\
**Post date:** [July 13, 2010, 11:33pm UTC](https://www.ruby-forum.com/t/400-bad-request-errors-on-a-mediawiki-configured-to-use-images-from-wikimedia-commons/191526/2 "2010-07-13T23:33:00Z")

</div>

Hi Omega13a 😉

> First of all, I’m using nginx 0.8.45 and have a wiki on my website  
> that’s configured to use images off of Wikimedia Commons. It saves the  
> images onto my server and updates them at regular intervals…  
> [http://urcreative.hobby-site.com/wiki/images/thumb/3/34/25%.svg/9px-25%.svg.png](http://urcreative.hobby-site.com/wiki/images/thumb/3/34/25%25.svg/9px-25%25.svg.png)

Was it working with prev. nginx version?

It seems that your redirect is actually configured to handle  
[http://urcreative.hobby-site.com/wiki/images/thumb/3/34/25%](http://urcreative.hobby-site.com/wiki/images/thumb/3/34/25%25)  
25.svg/9px-25%25.svg.png

(every percent sign that you put in your URL I’ve replaced to %25)

Could you show fragment of your config and probably I or someone else  
will be able to figure out what’s wrong?

Bad request is probably happening because nginx is trying to decode %xx  
in your url but finds “%.s” which is not supposed to be in URL…

Alex.  
p.s. cheers from [dyndns.com](http://dyndns.com) team 🙂
