I have an apache server running on CentOs and I would like deploy my Angular4 project on this server. This project is deploy in /var/www/html folder. It works weel, except the routing part. When I refresh or access to different URL from the basic index.html, I have a 404 error.
I followed this link : https://angular.io/guide/deployment#routed-apps-must-fallback-to-indexhtml but nothing change.
My .htaccess :
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
RewriteRule ^ /index.html
Part of my /etc/httpd/conf/httpd.conf file :
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
The 404 error is always here. I don't know how i can fix this problem. Did i do something wrong ? Thanks in advance