Monday, October 24, 2016

.htaccess missing from server breaks all page links except index.php

I had deployed my application from my new Mac, my first time, and got an error on AWS:

the requested URL /about was not found on this server

I struggled trying to debug my application and then figured out it had to do with my server. Which means, the issues was with my file: .htaccess

Come to find out after nobody made the following simple statement, I figured out the solution.

  1. Show all hidden files on your Mac.
  2. Go to the directory/folder that you're zipping up to upload and deploy on ElasticBeanstalk in AWS.
  3. Zip up all the subfolders and files (by compressing into .zip file), but make sure the '.htaccess' file is included!
  4. Then upload and deploy in AWS.

Tah-dah! Another problem solved!