How to alter .htaccess to fix .epub downloads
-
I wonder if anyone can help me fix up WordPress to allow download of .epub files for ereaders. It involves a bit of .htaccess knowledge: mine is rudimentary to say the least.
I’m having a problem with the issue of WordPress serving unknown files with the content-type of “Content-Type text/plain” in the HTTP header.
I have followed the instructions on the helpful adding-ebook-epub-and-mobi-downloads-to-wordpress/.
I’ve changed .htaccess to include, as suggested:
AddType application/epub+zip .epub
AddType application/x-mobipocket-ebook .mobiNowt happens…
What this means is that:
1) Mac users get binary code gobbledygook when attempting to download a .epub file
2) Internet Explorer users get a .zip file instead of an a .epub fileMy .htaccess file contains this – anything wrong here?
I have the mod_rewrite “on”, and have put the AddType command at the bottom (after the test site gumph).# BEGIN WordPress <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 AuthType Basic AuthName "Test site" AuthUserFile "/home/joannast/.htpasswds/public_html/passwd" require valid-user AddType application/epub+zip .epub AddType application/x-mobipocket-ebook .mobi
- The topic ‘How to alter .htaccess to fix .epub downloads’ is closed to new replies.