tmyonline Posted January 28, 2012 Share Posted January 28, 2012 Hi guys, I would like a capability so that when someone visits these URLs, http://www.domain.com/somedir/xyz.php http://www.domain.com/somedir/info.php they will be respectively re-directed to: http://www.domain.com/somedir/main.php?p=xyz http://www.domain.com/somedir/main.php?p=info Any idea on how to do it in Apache or PHP ? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/255918-how-to-re-direct-url/ Share on other sites More sharing options...
joel24 Posted January 28, 2012 Share Posted January 28, 2012 if the redirects are not constantly changing, use apache's HTACCESS rewrite rule otherwise you can use PHP to do a header('location: domain.com?var=1'); exit(); Quote Link to comment https://forums.phpfreaks.com/topic/255918-how-to-re-direct-url/#findComment-1311854 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.