conker87 Posted May 1, 2007 Share Posted May 1, 2007 All I'm wanting to do is redirect from the root (/) of the site (which is index.php) to /?area=news when there is nothing after the Forward slash - and for the life of me I cant find anything that works! Anyone help here? It's probably staring me in the face. Link to comment https://forums.phpfreaks.com/topic/49384-solved-small-redirect-problem/ Share on other sites More sharing options...
clown[NOR] Posted May 1, 2007 Share Posted May 1, 2007 some code would be really helpfull Link to comment https://forums.phpfreaks.com/topic/49384-solved-small-redirect-problem/#findComment-242024 Share on other sites More sharing options...
conker87 Posted May 1, 2007 Author Share Posted May 1, 2007 No code needed really. All I want is that if the url in the address bar is just http://www.mydomain.com/ then to redirect to http://www.mydomain.com/?area=news Link to comment https://forums.phpfreaks.com/topic/49384-solved-small-redirect-problem/#findComment-242026 Share on other sites More sharing options...
clown[NOR] Posted May 1, 2007 Share Posted May 1, 2007 oh ok... try this: <meta http-equiv="refresh" content="0;http://www.yourdomain.com/?area=news" /> Link to comment https://forums.phpfreaks.com/topic/49384-solved-small-redirect-problem/#findComment-242027 Share on other sites More sharing options...
conker87 Posted May 1, 2007 Author Share Posted May 1, 2007 Success! I've probably gone around it the wrong way, but I did it: if ($_SERVER['REQUEST_URI'] == "/") { header("location: /?area=news"); } Thanks anyway! Link to comment https://forums.phpfreaks.com/topic/49384-solved-small-redirect-problem/#findComment-242030 Share on other sites More sharing options...
clown[NOR] Posted May 1, 2007 Share Posted May 1, 2007 No problem.. Mark as solved Link to comment https://forums.phpfreaks.com/topic/49384-solved-small-redirect-problem/#findComment-242032 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.