Is it possible to redirect user to file file too big
page
when POST request size exceeds specified limit?
I am aware about max-request-size option, but it gives just static page that cannot be overloaded.
I am thinking to create a rewrite rule which takes
content-size from request body as input and redirects to error page
UPDATE
now we use nginx as front-end. Any new suggestions?
You should be able to do this using something like:
Don't forget to set
post_max_size
andupload_max_filesize
to corresponding value inphp.ini
.Regarding @quanta post, you can also put a lower value in php and use php to display the error and make the redirection correctly. It can be made in other scripting languages also :-)