Please help in .htaccess

Discussion in 'Apache' started by webmaster365, Aug 18, 2011.

  1. #1
    Hello All,

    I want to increase file upload size , but in local it's working fine.
    When i upload into production server it's throwing 500 error.

    my .htaccess is as below.

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.php -f
    RewriteRule ^(.*)$ $1.php
    RewriteCond %{HTTP_HOST} !^www\.domain\.com$
    RewriteRule (.*) http://www.domain.com/$1 [R=301,L]

    php_value upload_max_filesize 20M
    php_value post_max_size 20M
    php_value max_execution_time 200
    php_value max_input_time 200

    <IfModule mod_expires.c>
    <FilesMatch "\.(gif|jpg|jpeg|png|swf|html?|xml|txt)$">
    ExpiresActive On
    ExpiresDefault "access plus 10 years"
    </FilesMatch>
    </IfModule>
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    <IfModule !mod_expires.c>
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|html?|xml|txt))$ smartoptimizer/?$1
    </IfModule>
    </IfModule>
    <FilesMatch "\.(gif|jpg|jpeg|png|swf|html?|xml|txt)$">
    FileETag none
    </FilesMatch>
    #Options All


    Please help on this.

    Thanks in Advance.
     
    webmaster365, Aug 18, 2011 IP
  2. rndm

    rndm Greenhorn

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    Does your server allow overriding php params via htaccess? Just to be sure, echo out the values in a php script to be sure they are being set properly. For example, set your max size to a weird value like 23 and echo out the variable to see if it reports as 23
     
    rndm, Aug 19, 2011 IP