: HTML files downloading rather than executing Trying to get a client's site up. The HTML files keep downloading rather than executing. I've done a MIME check and the files appear to be text/html.
Trying to get a client's site up. The HTML files keep downloading rather than executing.
I've done a MIME check and the files appear to be text/html. I recreated the database admin, password and made sure that there was a connection between the script and the MySQL database. Permissions seem to be fine and the index.html is executable, permissions 755. Not sure where to turn next.
More posts by @Deb1703797
1 Comments
Sorted by latest first Latest Oldest Best
When a web browser offers to download a file rather than open it, it is generally because the headers are incorrect. It sounds like you already checked the "Content-Type" header, but you also need to check the "Content-Disposition" header.
An easy way to check the headers on your page is to use the command line tool curl:
curl -s --head 'http://example.com/'
The "Content-Type" header should start with "text/html". There should be no "Content-Disposition" header. If you see something like this, you will need to configure your server to remove it:
Content-Disposition: attachment; filename="file.html"
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.