Our rewrite rule in htaccess is:
- Code: Select all
RewriteRule ^dimage/(.*).png /_site/image/cached_dynamictext/$1.png [nc,l]
# check if requested file exists
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^_site/image/cached_dynamictext/(.*).png /_site/include/lib/image/dimage.php?array=$1 [nc]
The theory is that when htaccess comes across a url like
- Code: Select all
/dimage/<long string>.php
The issue is that when a sufficiently long url is passed to the /dimage/ url... We get a 403 error and a log entry:
- Code: Select all
The parameter is incorrect. : Cannot map GET /dimage/<long url>.png HTTP/1.1 to file
HOWEVER the error will disappear if we take away the /cached_text/ check in our htaccess. So,
- Code: Select all
RewriteRule ^dimage/(.*).png /_site/include/lib/image/dimage.php?array=$1 [nc]
Works. Also referring directly to the dimage script will also work. So:
- Code: Select all
/_site/include/lib/image/dimage.php?array=<long string>
Works.
Does anyone know if it is possible to get this working? Or any suggestions to try?
Also the long string will fail when it is around 300 characters.