.htaccess + node.js + express don't run correctly

the first one in function therefore which is currently used allows access to my member area but when I update it gives me Error page; And the 404 NotFound page is not managed although locally yes.

#BEGIN Cache-Control Headers

<FilesMatch “.(ico|jpe?g|png|gif|swf|css|gz)$”>

Header set Cache-Control “max-age=2592000, public”

<FilesMatch “.(js)$”>

Header set Cache-Control “max-age=2592000, private”

<filesMatch “.(html|htm)$”>

Header set Cache-Control “max-age=7200, public”

Remove cache for dynamic resources

<FilesMatch “.(pl|php|cgi|spl|scgi|fcgi)$”>

Header unset Cache-Control

END Cache-Control Headers

the second allows the updating of pages without errors and manages the 404 NotFound but does not allow access to the member area, concerning this .htaccess, is there a restriction on your side to be aware of?

RewriteEngine On

RewriteBase /

RewriteRule ^index.html$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule. /index.html [L]

Thank you for your observations. Locally, everything works correctly

  • thats nice but when you deploy what “slug”/ “route url” looks like?
  • also to consider “if you’re directly using slug” / “going to that page by interacting with page”, are you getting “404” for both scenarios?

happy coding :slight_smile:

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