Add : 웹 버그 제거
This commit is contained in:
parent
590900d5ee
commit
31389a2a02
14
.htaccess
14
.htaccess
@ -1,14 +1,16 @@
|
||||
RewriteEngine On
|
||||
|
||||
# Remove .html extension from URLs
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^([^\.]+)$ $1.html [L]
|
||||
|
||||
# Redirect .html URLs to clean URLs
|
||||
# Redirect .html URLs to clean URLs (except index.html)
|
||||
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
|
||||
RewriteCond %1 !^index$ [NC]
|
||||
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
|
||||
ErrorDocument 404 /index.html
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user