.htaccess ignored by hugo serve?

Hi,

I have a .htaccess file in the static directory. It looks like it is not taken into account when I run hugo serve (however it works once in production).

Is there a way to have it taken into account during development with hugo serve?
It would be quite helpful to test things like redirections, headers set on some resources, etc.

Many thanks!

No, there is not. If you need to test an .htaccess file you should locally install the server you use in production.

1 Like

Many thanks Jmooring! Good to know.

1 Like

.htaccess is a peculiarity of the Apache web server. It has nothing to do with Hugo. You must test your redirections, headers and “resources” in production.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.