I want to set a PHP value just for some URL. For example, I have many URLs and one of them is http://example.com/admin
. I want to add post_max_size
php_value
for this URL only.
I want to set a PHP value just for some URL. For example, I have many URLs and one of them is http://example.com/admin
. I want to add post_max_size
php_value
for this URL only.
2
Answers
You might be able to use an Apache expression (Apache 2.4) in
.htaccess
to isolate that one URL, otherwise the directive will naturally apply to this directory tree.Something like:
Whether you can set a
php_value
at all in.htaccess
is dependent on PHP being installed as an Apache module.unfortunately the construct
doesn’t work, because it seems, that on “php_value” parameter parse, the REQUEST_URI variable is not initalized. I managed to get it working by comparing THE_REQUEST variable and preg matching: