Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can ".htaccess" file work with npm's "http-server" command?

This is probably a rookie question, but although the npm http-server page states:

...http-server is a simple, zero-configuration command-line http server...

Does this mean it completely disregards an .htaccess file? If so, is there another (yet still simple to use) HTTP server alternative that reads and uses it?

like image 562
chamberlainpi Avatar asked May 14 '15 23:05

chamberlainpi


1 Answers

.htaccess is an Apache configuration file. Since Apache isn't npm, Apache configuration files will obviously not work for npm.

Npm uses environment variables and npmrc files to configure things. See this documentation page.

In your case it looks like that this might do what you want it to do.

like image 87
Sumurai8 Avatar answered Oct 18 '22 18:10

Sumurai8