nginx - Send requests to a single html page with resources only on root path -


i'm trying redirect every request on page single html page so:

  • somedomain.com -> /www/somedomain.com/index.html
  • somedomain.com/foo -> /www/somedomain.com/index.html
  • somedomain.com/foo/bar -> /www/somedomain.com/index.html

i achieved using nginx configuration so:

location / {     try_files $uri /index.html; } 

now problem if access page deep url somedomain.com/foo/bar referenced css / js / etc. can't accessed because tries files /www/somedomain.com/foo/css/style.css instead of /www/somedomain.com/css/style.css


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -