Created
May 8, 2014 18:04
-
-
Save tkon99/0bf81c3fba5c90963c95 to your computer and use it in GitHub Desktop.
Rewrite top level url to index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//header begin | |
/* | |
* Force url rewrite (www.website.com -> www.website.com/index.php) | |
*/ | |
$req = $_SERVER['REQUEST_URI']; | |
if (strpos($req,"index.php") !== false) {//if true (good, no rewrite needed) | |
}else{ //redirect if false | |
header('Location: index.php'); | |
} | |
//end header | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will basically force the browser to update index.php instead of using it's cache to load the top level website.