I have a custom .reg file, which is used to apply registry adjustments. Making it a download is causing Internet Explorer ad FireFox to treat it as a media file, or download it as an MP3?
Has anyone seen this before?
Figured it out. Needed to add MIME type support to my Apache Web Server:
Using the following configuration:
AddType text/plain .reg
I changed .htaccess to:
AddType text/text .reg
It did the trick for Firefox and IE. In IE I didn't even have to download the file. Clicking it sent it directly to the registry (after ample warnings). When I changed it to text/plain it appended .txt in Firefox.
Related
I have searched all around and the only results I get are using wget or curl.
I would like to be able to download full directories being served on my apache server using just a URL. For example if I want to download the directory Contents, I would like to be able to do this: http://127.0.0.1/Contents. Instead, when I do this, I just get a page with all the files inside it instead of actually downloading the directory.
Is it because this is not possible? Or because i just need to configure it in apache2.conf ?
Worked it out, in order to download a folder/directory from a URL, compress the folder into a .zip file or anything similar to .zip, then call it in the URL: http://127.0.0.1/yourfolder.zip
I have book my itinerary and the travel website delivered the ticket along with the pkpassfiles. Unfortunately neither Safari nor Chrome detects it and show the option to open in passbook application. It shows options like FileApp/CHM reader etc. How to solve this?
I use default Gmail iOS App/Safari for opening opening mails (It's a gmail server)
As Petesh menions, your server is not serving the file a mime type of application/vnd.apple.pkpass.
If using Apache, try adding the following to your .htaccess file or server .conf
AddType application/vnd.apple.pkpass .pkpass
If you are generating the .pkpass files manually, you can set the content header when serving the file. E.g. for PHP you can use:
header('Content-Type: application/vnd.apple.pkpass');
When I connect to a web-site that is using Silverlight, my understanding is that the "XAP" file is downloaded to C:\Users\ "UserName" \AppData\Local\Temp folder (under windows Vista).
There are few sites that I know that are using "XAP" files but I don't see a "XAP" file in this folder. Any ideas?
I think I found the answer. It just gets downloaded to the logged-in user's temporary internet files folder.
Since I've installed LAMP stack on ubuntu server with apache2, I've been having a weird issue. Whenever I create a file called filename.html, it renders and displays on browser fine. But whenever I create file with extension .htm, it will prompt the browser (firefox) to save the file.
I've already looked into /etc/mime.types and /etc/apache2/mod-enabled/mime.load
And what's in these files for .htm extension?
Can you check what mime-type returned by the Apache? (via browser plugins/sniffer)
After that you will see the issue...
When I try to do a file('http://somewebsite.com') i get an error
"URL file-access is disabled in the server configuration"
I tried using ini_set('allow_url_fopen', 'On'); but that didn't work.
I'm using shared hosting. Any suggestions?
All I want to do is read the html source code of a website.
On php version>4.3.4 and <6, you can't set allow_url_fopen in your script. Try using curl instead.
If your hosting allows and reads custom .htaccess files, try putting the following line to a .htaccess at the root of your project:
php_flag allow_url_fopen on
and see if it has an effect...