I appreciate Swadesh Behera for contributing so much to Web Community who provides several demo application on Angular JS, PHP and mySQL.
Particularly http://www.angularcode.com/user-authentication-using-angularjs-php-mysql/ is great.
I did setup on my local windows 2007 Laptop with PHP Separate distribution using Windows Apache 2.4.
People have consistently faced problem when they are running the Demo application in their local env.
session, signup and login HTTP Get and Post services consistently failed with 404 error.
I faced too and understood that issue would be primarily by doing two things.
- .htaccess
- httpd.conf allowing URL so 404 error could be resolved.
Steps i did to fix the issue.
- .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ %{ENV:BASE}index.php [QSA,L] - httpd.conf.. Allowoveride ALL has to be done to fix 404 error.
<Directory “Z:/Projects/xyz/Apache24/htdocs”>
#
# Possible values for the Options directive are “None”, “All”,
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be named *explicitly* — “Options All”
# doesn’t give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>