.htaccess 파일에 문제가 있습니다. 나는 Google Pagespeed와 GTMetrix를 사용하여 내 사이트를 최적화하고 있으며 계속해서 "브라우저 캐싱을 활용"한다고 말합니다. 그래서 난 그냥 내가 먼저 아무것도 없었다 다음 줄htaccess 파일이 무시되고 Pagespeed 용 브라우저 캐싱을 활용하려고합니다.
## 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"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</ifModule>
# END Cache-Control Headers
을 내 htaccess로 파일을 추가 포함, 나는 그냥 '만료 캐시'코드의 첫 조각을 시도하고 그 이후의 일을 변경하지 않은 다시 테스트 한 결과, 두 번째 코드 -> 캐시 제어 헤더 쌍을 추가했습니다. 이상하게도 나는 아직도 같은 점수를 얻고있다.
나는 HTACcess 파일이 괜찮아 보이지만 아마 내 서버에 문제가있는 것 같아. 아니면 잘 모르겠다. 너희들 아마 할거야!
내 .htaccess 파일은 index.html 및 assets 폴더와 동일한 폴더에 있습니다. 파일 구조는 다음과 같습니다
/public_html/domain/company_name/website/.htaccess - For the .htaccess file /public_html/domain/company_name/website/index.html - For the index.html file
THIS URL 위의 index.html 파일로 연결됩니다.
제목을 쓰면 다른 많은 관련 주제를 보았지만 대부분 작동하지 않았습니다. 많은 관련 주제가/etc/..에서 손상되거나 간섭하는 파일에 관한 내용을 게시 한 곳입니다./etc/폴더가 없으므로 그럴 수 없습니다.
"잡히지 않은 오류 : 정의되지 않은 함수 apache_get_modules() 호출" – REJH
내가 인터넷 검색으로 많은 일을했기 때문에 실제로 나를 돕기가 약간 어렵습니다. 그러나, 당신은 위의 함수를 google 할 수 있습니다 -> (print_r (apache_get_modules()); <- 어떻게 사용하는지보십시오. 가장 쉬운 방법은 단순히 파일 (예 : "apache-modules.php")을 작성하고 위의 부분을 작성하는 것입니다 파일을 서버에 업로드하고 navigate (예 : domain.com/apache-modules.php)하면 모든 아파치 모듈의 목록을 보여 주어야한다. 필자의 경우처럼 당신이 활성화해야하는 방법을 google로 설정해야합니다. 사용하도록 설정된 경우 다른 작업이 진행되고 있습니다. –
답장을 보내 주셔서 감사합니다. 환경과 관련이 없다고 생각합니다.이 방법은 사용할 수 없습니다 .. – REJH