搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Uploading .htaccess via FireFTP made website crash

  • 1 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 philipp

more options

I was trying to enable browser caching on my website, so I entered the following code in my .htaccess file

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##

When I updated it using fireftp, it caused the entire site to go blank. I then tried to replace it with the backup .htaccess I had created, and the problem remained. What am I doing wrong? Why does the backup version not work when it was working previously?

I was trying to enable browser caching on my website, so I entered the following code in my .htaccess file <pre><nowiki>## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule> ## EXPIRES CACHING ##</nowiki></pre> When I updated it using fireftp, it caused the entire site to go blank. I then tried to replace it with the backup .htaccess I had created, and the problem remained. What am I doing wrong? Why does the backup version not work when it was working previously?

由 cor-el 於 修改

所有回覆 (1)

more options

hi, support.mozilla.org is intended for end-user support. if you have a question regarding web development please refer to Where to go for developer support instead. thank you for your understanding!