0
내 htaccess는 기존의 페이지가 아닌 올바른 사용자 정의 404 페이지를 표시하지만 domain.com/existingdirectory과 같은 색인 파일이없는 디렉토리의 경우 기본값이 아닌 사용자 정의 내부 오류 페이지. 문제는 어디에 있는지 파악하십시오..htaccess는 기존 URL이 아닌 기존 URL에 대해 404 페이지를 표시합니다.
ErrorDocument 400 /404.php
ErrorDocument 403 /404.php
ErrorDocument 408 /404.php
ErrorDocument 500 /404.php
ErrorDocument 404 /404.php
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
</IfModule>
<Files .htaccess>
Order Allow,Deny
Deny from all
</Files>
Options All -Indexes
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/rss+xml \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/x-web-app-manifest+json \
application/xhtml+xml \
application/xml \
font/opentype \
image/svg+xml \
image/x-icon \
text/css \
text/html \
text/plain \
text/x-component \
text/xml
application/ld+json \
application/manifest+json \
text/vtt \
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType image/x-icon "access plus 1 week"
ExpiresByType text/x-component "access plus 1 month"
ExpiresByType text/html "access plus 0 seconds"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/font-woff2 "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType font/truetype "access plus 1 month"
ExpiresByType text/javascript "access plus 1 year"
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
</IfModule>
정말 죄송합니다. 'RewriteEngine On RewriteBase /'는 이제 파일이 없습니다. 분명히 문제가 해결되었습니다. 그러나 내가 새로 왔기 때문에'RewriteEngine On RewriteBase /'를 완전히 제거하시오. – XIMRX
@XIMRX 예,'modModule' 조건을'mod_rewrite'를 사용하지 않으므로'ErrorDocument' 지시자가 필요 없습니다. 이 모듈과 관련이 없습니다. – Cheery
고마워. 그리고 나와 미래의 방문자를 도울 수있는 다른 오류를 지적 해 줄 수 있니? – XIMRX