如何在apacheconfiguration文件中为特定(虚拟)URLpath设置PHP iniconfiguration设置?

我想为我的networking服务器上的特定URL设置特定的upload_max_filesize设置。 URLpath不是一个真正的path,因为它是一个Apache重写的SEO友好的path。

这似乎不工作:

 <Directory /var/www/test_upload> php_value upload_max_filesize 750M </Directory> 

文档根目录(/ var / www /)中的.htacces文件中的重写规则如下所示:

 RewriteRule .* index.php [L] 

使用< Location >规则而不是< Directory >。 不过,您也可以在PHP文件中设置ini参数。