0

I have developer angular app from WordPress rest API. I my WordPress baseURL and Angular app both are in same director (this is because WordPress and Angular URL are matched). But in this setup issue is, when I direct open URL i.e. /blog or /anyPAGE, then it send request to WordPress instead of angular(index.html) so is there a way to serve my app from index.html instead of index.php?

0

yes, why not name your app's page app.html it seems your hosting gives a priority to .php instead of .html This is controlled by Apache's DirectoryIndex setting.

| improve this answer | |
  • but how can I controlled this? can share some snippet? – Chirag S Modi May 20 '19 at 12:04
  • What does google reveal when you search for DirectoryIndex ? – Svetoslav Marinov May 20 '19 at 12:08
  • yes, I already googled, it show <Directory "/foo"> DirectoryIndex index.html DirectoryIndex index.php </Directory> and when I applied, it show 500 error – Chirag S Modi May 20 '19 at 12:24
  • The second result shows: DirectoryIndex index.html index.php – Svetoslav Marinov May 22 '19 at 8:36
  • yes I already tried, its not use – Chirag S Modi May 22 '19 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.