Apache – Rewrite all URIs to a single file

This week I had to help a friend with his new small ReacJS website running on Apache.

His problem was that URIs which does not exist the Apache was returning as 404 pages, he needed a common rule used by a lot of PHP frameworks, Rewrite all URIs which are not Files or Directories to /index.html

Example URL www.example.com/myprofile to actually load www.example.com/index.html and let the ReactJS route do his work and show what it needs.

Continue reading “Apache – Rewrite all URIs to a single file”