Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to set a specific upload_max_filesize setting for a specific URL on my webserver. The URL path is not a real path since it is a apache rewritten seo friendly path.

This does seems not to work:

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

The rewrite Rule in the .htacces file in the document root (/var/www/) looks like:

RewriteRule .* index.php [L]
share|improve this question
Unless you are offering the upload option multiple times for multiple locations you can set globally in php.ini and not worry about setting it for a directory. – Sameer Mar 3 '11 at 16:54

Use a <Location> rule instead of <Directory>. You could set the ini param in your PHP file as well, though.

share|improve this answer
Sounds good, I will try it! – powtac Mar 10 '11 at 9:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.