Hi. We have an issue with a php image generator script, and a cached directory monitored by htaccess . The issue is when a url being fed to htaccess is too long, it results in a Access Forbidded 403 error.

it will check if an image sits in the /cached_dynamictext/ directory. If it does then we use it. If not we refer to the dimage.php script which displays an image and drops it in the /cached_dynamictext/ directory when it is finished.

The issue is that when a sufficiently long url is passed to the /dimage/ url... We get a 403 error and a log entry:

Hi Thanks for the reply. I think the error has nothing to do with mod rewrite.. but instead is an issue with filenames over 255 characters.

Since we can't use this method and store the entire data array into the filename.. I think what we are going to go with is instead a dual-filename. So we would generate a hash in addition to the image information. So:

This way the mod_rewrite will only look up images with the hash... and if that doesnt work it will send the long information to the dimage.php script... which will then generate the file with the name of the hash.