apache - Address Bar not changing - PHP -


i using header('location:') redirect user webpage. but, instead of overwriting previous address on address bar, new 1 gets appended 1 present. example:

the address bar holds:

localhost/v2/admin

and there header('location:'.diradmin.'login.php'); diradmin constant defined as

define(diradmin,'localhost/v2/admin/'); 

then, after redirect, new address bar be

localhost/v2/admin/localhost/v2/admin/login.php 

i thought because of server, using. using uniform server zero. installed wamp , problem continues.

i still noob, have no idea causing , if problem because of mod_rewrite, on both servers module active. checked of problems redirect-php header(location:..)

among others. did google search no end. how can solve problem?

header_remove(); 

will not work first address typed in manually , not set header();

define

define('diradmin','localhost/v2/admin/); 

as

define('diradmin','http://localhost/v2/admin/'); 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -