1<IfModule mod_rewrite.c>
2 RewriteEngine On
3 RewriteBase /subdirectory
4 RewriteRule ^index\.html$ - [L]
5 RewriteCond %{REQUEST_FILENAME} !-f
6 RewriteCond %{REQUEST_FILENAME} !-d
7 RewriteCond %{REQUEST_FILENAME} !-l
8 RewriteRule . /index.html [L]
9</IfModule>
1Nginx:
2location / {
3 try_files $uri /index.html;
4}
5
6Apache
7<IfModule mod_rewrite.c>
8 RewriteEngine On
9 RewriteBase /
10 RewriteRule ^index\.html$ - [L]
11 RewriteCond %{REQUEST_FILENAME} !-f
12 RewriteCond %{REQUEST_FILENAME} !-d
13 RewriteCond %{REQUEST_FILENAME} !-l
14 RewriteRule . /index.html [L]
15</IfModule>