0

My website will initiate a download instead of opening in the browser. I can access the login redirect and wp-admin however.

website is: www.keymoneyconcepts.com.au

My .htaccess file looks like the below:

# BEGIN WordPress
<IfModule mod_expires.c>
 ExpiresActive On
 ExpiresByType image/jpg "access plus 1 year"
 ExpiresByType image/jpeg "access plus 1 year"
 ExpiresByType image/gif "access plus 1 year"
 ExpiresByType image/png "access plus 1 year"
 ExpiresByType text/css "access plus 1 month"
 ExpiresByType application/pdf "access plus 1 month"
 ExpiresByType text/javascript "access plus 1 month"
 ExpiresByType image/x-icon "access plus 1 year"
 ExpiresDefault "access plus 1 weeks"
</IfModule>
Options -Indexes
<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteRule ^/wp-content/endurance-page-cache/ - [L]
 RewriteCond %{REQUEST_METHOD} !POST
 RewriteCond %{QUERY_STRING} !.*=.*
 RewriteCond %{HTTP_COOKIE} !(wordpress_test_cookie|comment_author|wp\-postpass|wordpress_logged_in|wptouch_switch_toggle|wp_woocommerce_session_) [NC]
 RewriteCond %{DOCUMENT_ROOT}/wp-content/endurance-page-cache/$1/_index.html -f
 RewriteRule ^(.*)$ /wp-content/endurance-page-cache/$1/_index.html [L]
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Would you have any suggestions?

Thanks

pieguyfly
  • 1
  • 1
  • 1
  • maybe this is sth belonging to your problem, http://stackoverflow.com/questions/1428575/mod-rewrite-help-to-change-content-disposition-based-on-uri the content disposition is set to attachement on yours? – DotNetDev Mar 29 '17 at 08:48
  • Searching for "endurance-page-cache" seems to give some problems, although none of download vs executing PHP scripts. Maybe PHP is disabled somehow on your site. – Olaf Dietsche Mar 29 '17 at 09:20

1 Answers1

0

check it via fiddler, i got

HTTP/1.1 200 OK Server: Apache Last-Modified: Fri, 10 Mar 2017 00:21:28 GMT ETag: "1a2-54a5557bcafa7" Cache-Control: max-age=604800 Expires: Wed, 05 Apr 2017 01:25:19 GMT Content-Type: application/x-httpd-php X-Cacheable: YES Content-Length: 418 Accept-Ranges: bytes Date: Wed, 29 Mar 2017 08:51:08 GMT X-Varnish: 657727275 657725514 Age: 26749 Via: 1.1 varnish Connection: keep-alive

/** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */ require( dirname( FILE ) . '/wp-blog-header.php' );

DotNetDev
  • 205
  • 1
  • 10
  • so I assume, that your wordpress installation has some errorprone logic – DotNetDev Mar 29 '17 at 08:53
  • Would this have anything to do with permissions? For some reason, when entering the site with a fresh cache it'll download, but after attempting to login etc you have full access to the site – pieguyfly Mar 29 '17 at 09:16
  • http://stackoverflow.com/questions/18422140/apache-is-downloading-php-files-instead-of-displaying-them – DotNetDev Mar 29 '17 at 21:23