That is because of leading slash. Try this:
RewriteEngine On
RewriteRule ^start/?$ /index.html [L]
.htaccess
is per directory directive and Apache strips the current directory path (thus leading slash) from RewriteRule
URI pattern.
문제
How to create .htaccess
file that redirect short links into html files?
Eg.
RewriteEngine On
RewriteRule ^/start$ http://www.%{HTTP_HOST}/index.html [L]
The above rule gives me a 404 error
. I have my index.html
in the main folder.
해결책
That is because of leading slash. Try this:
RewriteEngine On
RewriteRule ^start/?$ /index.html [L]
.htaccess
is per directory directive and Apache strips the current directory path (thus leading slash) from RewriteRule
URI pattern.