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
Post a Comment