[Techtalk] weird wordpress error: 404 on % in permalinks

Carla Schroder carla at bratgrrl.com
Fri Oct 19 20:43:40 UTC 2012

hey all,

A friend is having a strange issue with Wordpress permalinks, and I am
baffled. In the admin panel he wants to use something like this for
permalinks: /%year%/%month%/%postname%   Plain old ordinary stuff,
right? But this always creates 404 error. This always happens with a
percent sign followed by a non-whitespace.

I thought it was mod_rewrite not enabled, but he says:

"I'm not sure this error is related to mod_rewrite. The fact that this
error pops up when I submit POST data that contains a percent sign
("%") followed by non-whitespace leads me to believe that the webserver
is interpreting that portion of the POST data as a Unicode entity.
Sooo... I did a little experiment:

   1. On the WordPress admin permalinks page, I tried submitting one of
   the standard, predefined permalink patterns. I got a 400 BAD REQUEST
   error like I did last Monday.
   2. I tried submitting a permalink pattern that is only this text:
   "%20" (minus the quotes.) %20 is a Unicode entity that signifies a
   space. This was submitted successfully *without error*.
   3. I tried submitting only this text: "%y". That would be an invalid
   Unicode entity. Submitting it produced the 400 BAD REQUEST error.

To be sure, the same error also pops up when I submit forms in the theme
admin page, which is totally separate from the permalinks page.

So, it looks like the webserver is interpreting the body of the POST
data for entities, which it isn't supposed to do."

Thoughts? It's Apache with the usual LAMP accessories on CentOS 6.3.


Carla Schroder
ace Linux nerd
buy my books! Book of Audacity,
Linux Networking Cookbook,
Linux Cookbook

More information about the Techtalk mailing list