How to fix index.php downloads instead of opening

How to fix index.php downloads instead of opening

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 
Custom Search
affiliate_link

You open your web page and your browser ask to download a php file instead of opening the page. This means your server have trouble in parsing the php files.

Php parsing is a common problem that is occurred due to misconfiguration in the server side, can be fixed by accurate .htaccess rules.

  1. Backup your .htaccess file
  2. Delete the old .htaccess file
  3. Create a new .htaccess file with CHMOD = 777 and upload the new file in ascii mode.
  4. Add the following handler in the blank .htaccess
  5.    AddType application/x-httpd-php .php .htm .html
       AddHandler x-httpd-php .php .htm .html

    Alternative Way: You cal also try to add following code in the blank .htaccess

       AddType application/x-httpd-php php html

After creating the new .htaccess file, try to open your site, it should work.