I have deployed my ember app in Apache Tomcat version 9.
The index page works fine localhost:8080/myemberapp/
but when i try to access localhost:8080/myemberapp/login
it returns 404 error
.
I also Read about URL rewriting and added the following code snippet to .htaccess
file
#html5 pushstate (history) support:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.html [L]
</IfModule>
And added the following to tomcat conf/context.xml
file
<Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
But still I cannot access any other ember routes after deploying in Apache Tomcat.
Can anybody solve this so that, each routes in the ember app can be mapped to a custom URL.