live-server icon indicating copy to clipboard operation
live-server copied to clipboard

Use live server with .htacess file removing .html

Open thrivincode opened this issue 7 years ago • 5 comments

I used this in .htacess file to hide the ".html" in the URL to improve UX:

RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^.]+)$ $1.html [NC,L]

Now I cannot use live server to click on links anymore as it cannot open the files without .html. How to solve this? Can I embed my .htaccess file code into live server?

thrivincode avatar Jun 06 '17 05:06 thrivincode

I second support for serving without the .html extension just like http-server does

allejo avatar Jul 30 '17 00:07 allejo

I have a same problem, have you resolved it ? @thrivincode

zhuzhenzhen avatar Sep 15 '17 02:09 zhuzhenzhen

any new?

winuxue avatar May 11 '18 18:05 winuxue

Yeah, this is basically the only thing preventing me from using live-server instead of http-server. Would love to see it added. +1

edelstone avatar Jun 30 '18 09:06 edelstone

Are there plans to support this? Difficult to use live-server if all links are broken! Love the library otherwise.

sanjaypojo avatar Sep 09 '19 22:09 sanjaypojo