Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $uri = preg_replace("/\?.*/i",'', $_SERVER['REQUEST_URI']);
- if (strlen($uri)>1) {
- if (rtrim($uri,'/')."/"!=$uri) {
- header("HTTP/1.1 301 Moved Permanently");
- header('Location: http://'.$_SERVER['SERVER_NAME'].$uri.'/');
- exit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement