I am trying to add a hyperlink to a PHP page running on our local webserver running Apache 2.2.11. I am linking an Excel 2007 spreadsheet (.xlsx) II have no administrative rights to this server, just the webroot.
When I link to this file, it tries to load a bunch of garbage into my browser window. If I right click the link and Save As, this works just fine, however I would like a download prompt when users click on this link.
I have added an .htaccess file in the directory of the PHP page and xlsx file. with just the line below, thinking this might clear the issue up, but it has not. I should also note that .xls (Excel 2003 and previous) files will behave correctly when clicked. What am I missing here?
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx