the code checks to see if site is at root. if it is then change it to root/index.php which in turn changes the url. the code would work great if it was not for the delay in the page load.
can i have an explanation as to why i might be seeing a delay with the code or an alternative to the code would be nice.
I have this code in the user module of my cms. how i am thinking it takes a few seconds to load the site before it gets to my code. then when the code is ran it loads the site up the second time which creates the delay. could this code do this?
Code: Select all
if ($_SERVER['REQUEST_URI'] == "/") {
header("Location: ./index.php");
}