AIPT/en/.htaccess

15 lines
413 B
ApacheConf
Raw Normal View History

2024-10-29 11:42:53 +08:00
# Enable the Rewrite Engine
RewriteEngine On
# If the requested file does not exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Check if a file exists with .php or .html extension
RewriteRule ^([^\.]+)$ $1.php [L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [L,NC]
# Redirect to custom 404 page if the file still doesn't exist
ErrorDocument 404 /404.php