Wamp (Apache) redirects calls on subdirectory php files to parent directory -
on local dev machine running wamp, strange behaviors.
- when call ajax call
/phplib/login.php
page, wamp (apache) redirect/login.php
. - the result same when call /phplib/login.php page directly browser.
- for information don't use .htaccess file.
- the same code running on centos machine apache (site located in
/var/www/html
) works fine.
i've searched hours can't find reason. help.
possible causes this:
- you have rewrite rule in server somewhere (.httpd-conf, vhosts configuration etc) rewriting url
- there file
root_directory/phplib/login.php
redirectingroot_directory/login.php
- you unknowingly changing form's action
/login.php
via javascript written long ago or similar - you have application-level route redirects
/phplib/login.php
/login.php
how debug
- terminate php execution on first line in
/phplib/login.php
- use decent webdev tool , make sure request sent
/phplib/login.php
initially. - see server response code is.
if request not sent @ right url initially, means client side messing request path.
if server responds 3xx code, means server configuration rewriting url somewhere.
if blank screen response code 200, means script has been called , exited on first line, mean application redirecting.
Comments
Post a Comment