This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.html$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.html [L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
# That was ONLY to protect you from 500 errors | |
# if your server did not have mod_rewrite enabled | |
RewriteEngine On | |
# RewriteBase / | |
# NOT needed unless you're using mod_alias to redirect | |
RewriteCond %{REQUEST_URI} !/public | |
RewriteRule ^(.*)$ public/$1 [L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
# Remove trailing slash if it exists | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)/$ /$1 [L,R=301] | |
# Serve HTML files without extension | |
RewriteCond %{REQUEST_FILENAME}\.html -f | |
RewriteRule ^(.*)$ $1.html [NC,L] | |
</IfModule> |