当サイトはユーザー体験を改善するためのメンテナンスを実施中に機能が制限される予定です。記事を読んでもあなたの問題が解決せず質問をしたい場合は、Twitter の @FirefoxSupport、Reddit の /r/firefox で、サポートコミュニティが皆さんを助けようと待機しています。

Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

Firefox can't open PDF links that have been rewritten in .htcaccess

  • 2 件の返信
  • 3 人がこの問題に困っています
  • 1 回表示
  • 最後の返信者: SsjCosty

more options

I have a Wordpress multi-site, and my problem is that Firefox can't open any of the PDFs that I have there. I get a dark-gray screen and it says "This PDF document might not be displayed correctly", but I am able to download it. In .htaccess I have this rewrite rule for files: RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

The thing is that if I write the actual path to the file it opens it in preview just fine. Also, Chrome and IE don't have this problem.

I have a Wordpress multi-site, and my problem is that Firefox can't open any of the PDFs that I have there. I get a dark-gray screen and it says "This PDF document might not be displayed correctly", but I am able to download it. In .htaccess I have this rewrite rule for files: RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] The thing is that if I write the actual path to the file it opens it in preview just fine. Also, Chrome and IE don't have this problem.

すべての返信 (2)

more options

Hello,

In order to change the default reader for PDF files (to not open PDF files with Firefox's internal PDF reader), follow these steps:

  1. Go to Tools > Options (or Firefox > Options).
  2. In the Options window, select the Applications tab.
  3. In the Search field, type PDF. You should find Portable Document Format (PDF).
  4. On the right handside you should find an Action column. Use that to select your favorite PDF reader. In order to view PDF files in Firefox, choose Preview in Firefox.

Did this fix your problems? Please report back to us!

Thank you.

more options

Hello,

Thanks for the suggestion, but it's not exactly what I'm looking for. My clients and other people experience the same issue on my site, and I don't think I can make them change their settings.

My problem is that even though the setting is Preview in Firefox, the browser just can't seem to be able to open it. But it is because I have that url rewrite line, whereas if I link to the PDF's actual path (without the rewrite) it opens it just fine. And I would like to keep the rewrite and have it working at the same time.