0

I have a website that has 3 basic pages: Home, About and Contact. The website is built using AngularJS and I am using ui.router for the routing.

Everything is working OK if you click on the navigation options, but when you refresh while on one of pages, /about or /contact, it throws 403 forbidden. Same issue if you directly try to access one of these pages: http://pricebyitem.com/about

This is run on Apache 2.4 - I'm not sure what I need to configure to make the direct access work.

Website: http://pricebyitem.com

Serylo
  • 26
  • 5

1 Answers1

0

Im sure this has been answered elsewhere on StackOverfow and therefore this question should be closed.

You need to implement HTML5 pushstate in Apache. This will return your index.html for each route requested.

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.html
Martin
  • 15,820
  • 4
  • 47
  • 56
  • I've tried adding this into an .htaccess file but it didn't do anything. I'm not sure where this goes... – Serylo Feb 18 '17 at 20:42