Add : 웹 버그 제거

This commit is contained in:
KINDNICK 2025-09-18 21:21:25 +09:00
parent 590900d5ee
commit 31389a2a02

View File

@ -1,14 +1,16 @@
RewriteEngine On RewriteEngine On
# Remove .html extension from URLs # Redirect .html URLs to clean URLs (except index.html)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [L]
# Redirect .html URLs to clean URLs
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC] RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteCond %1 !^index$ [NC]
RewriteRule ^ /%1? [NC,L,R=301] RewriteRule ^ /%1? [NC,L,R=301]
# Add .html extension to clean URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^.*\.(css|js|png|jpg|jpeg|gif|webp|svg|ico|pdf)$ [NC]
RewriteRule ^([^\.]+)/?$ $1.html [L]
# Handle 404 errors # Handle 404 errors
ErrorDocument 404 /index.html ErrorDocument 404 /index.html