You are here:  » Request-URI Too Large

Support Forum



Request-URI Too Large

Submitted by DVDAFFAIRES on Mon, 2013-02-18 08:59 in

Hi David.
On some products, I find in my error log from Google this:
Request-URI Too Large - The requested URL's length Exceeds the capacity limit for this server.
Looking at the url, it is produced with a very very long url, for example:
"{link saved}".
Is there a solution to shorten the url or remove this limit?

Thank you in advance for your reply.

Cheers,
Raoul

Submitted by support on Mon, 2013-02-18 09:47

Hello Raoul,

I see one of your merchants fancies their changes with hundreds of keywords in their product names! Unfortunately it is not anything that you have control of within PHP as it is a limit imposed by your web server installation; but what you can do is make the normalised_name field - from which URLs are constructed, limited to the first n characters (to the nearest space).

To do this, in includes/tapestry.php, look for the following code at line 31:

  return trim($text);

...and REPLACE with:

  return tapestry_substr(trim($text),100);

...for a limit of 100 characters in the product names used in the URL.

Cheers,
David.
--
PriceTapestry.com

Submitted by DVDAFFAIRES on Mon, 2013-02-18 10:55

Hello David.

That's perfect. A big thank you!

Cheers,
Raoul