Este site irá ter funcionalidade limitada enquanto fazemos manutenção para melhorar a sua experiência. Se um artigo não resolve o seu problema e quiser colocar uma questão, temos a nossa comunidade de apoio à espera de o ajudar em @FirefoxSupport no Twitter, /r/firefox no Reddit.

Pesquisar no apoio

Evite burlas no apoio. Nunca iremos solicitar que telefone ou envie uma mensagem de texto para um número de telefone ou que partilhe informações pessoais. Por favor, reporte atividades suspeitas utilizando a opção "Reportar abuso".

Saber mais

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

  • 2 respostas
  • 3 têm este problema
  • 1 visualização
  • Última resposta por 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.

Todas as respostas (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.