I have recently renovated the GFWR Software site at members.shaw.ca/gfwrsoftware. In former days, it easily allowed readers to download installer files for the freeware programs I write in Visual Basic 6. Now, however, WHEN PUBLISHED, an attempt at downloading causes an error stating "The website declined to show this page", etc. However, before publishing, when testing the website in three different browsers, the downloads commence as they should, with no problem at all. I used Dreamweaver CS4 to make the site, and I have no control whatsoever over the servers.

Dani AI

Generated

Brief follow-up for and anyone else seeing downloads work in local preview but fail on the live site. Common server-side issues often block certain file types or change how a browser receives them; the steps below are practical checks and quick fixes that were not covered earlier.

Start with these checks:

  • Use the browser DevTools Network tab or curl -I to capture the exact HTTP status and response headers when the download request is made. Note status codes (403, 404, 500) and the Content-Type and Content-Disposition headers.
  • Confirm the published filename/path and case sensitivity on the live server (local previews often ignore case issues).
  • Verify file permissions on the server (typical public files are 644) and that the file is inside the public webroot.
  • Ask the host whether executable files are blocked/scanned by security modules (mod_security, antivirus filters, MIME-type restrictions) or if certain extensions are disallowed on shared hosting.
  • Check for .htaccess or server rewrite rules that might intercept requests for certain extensions.

If the server is returning the file but the browser is showing a page or refusing to serve it, forcing correct headers helps. Example .htaccess addition (requires mod_headers and mod_mime):

<FilesMatch "\.(exe|msi)$">
  ForceType application/octet-stream
  Header set Content-Disposition "attachment; filename=%{REQUEST_FILENAME}e"
</FilesMatch>

If server-side scripting is available, a small download proxy script forces headers reliably:

<?php
$file = '/path/to/file.exe';
if (is_readable($file)) {
  header('Content-Type: application/octet-stream');
  header('Content-Disposition: attachment; filename="'.basename($file).'"');
  header('Content-Length: '.filesize($file));
  readfile($file);
  exit;
}
?>

If hosting policies prevent serving executables, packaging installers into an archive (zip) or using a trusted file-hosting/release service are practical workarounds. As suggested, a public URL or server response details make diagnosis much faster; collect a sample response when contacting the host.

Recommended Answers

All 2 Replies

Please provide code and/or a link (are you sure that it's an HTML/CSS question?)

Zipped the .exe files offered for download and all was OK. Thanks for trying.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.