Too long URLs in Apache

It turned out that in current version of Apache you’re limited to 255 characters at most between each pair od slashes (after URL decoding is done). This short article discusses this issue and maybe useful to all developers, who are dealing with “beauty” (SEO-optimized) URLs, like for example URLs to blog posts containing entire title inside.

This is a rare situation (255 characters limit between slashes, not for the entire URL), but still worth exploring.

An example URL:,4050,,,1,10,-postDate,,,,,,tribeman+ds.+seller+%C5%BCy+us+%C5%82+ping+net+,,,

won’t work in Apache and will cause it to throw 403 Access Denied error.

This comes from the fact that Apache maps each section (between slashes) to local filesystem and it hits its limitation here (255 characters at most per single level of directory tree).

There are a lot of ways to work around this problem, to name at first:

  • split too long part using additional slashes,
  • passing variables as GET parameters instead of slashes, etc.

Still, it is worth keeping above fact in mind.

Leave a Reply