ldoozer Posted October 10, 2009 Share Posted October 10, 2009 if you have two domain names and domain 1 'web forwards' (non-framed) to domain 2. Is there a way of telling the user once they reach the site that they have been redirected? Thanks for your help. Steve Quote Link to comment https://forums.phpfreaks.com/topic/177182-redirect-notice/ Share on other sites More sharing options...
keldorn Posted October 10, 2009 Share Posted October 10, 2009 hmm, You could include in the redirect a $_GET variable. When "Domain 1" redirects to "Domain 2" Have this in the url.. domain2.com/?redirect Then in domain 2 have if(isset($_GET['redirect'])){ $msg = "Hello you have been redirected!"; } Quote Link to comment https://forums.phpfreaks.com/topic/177182-redirect-notice/#findComment-934223 Share on other sites More sharing options...
keldorn Posted October 10, 2009 Share Posted October 10, 2009 By the way if you banking on for SEO (search engine optimization) using my method above would be undesirable. As Google, Bing, Yahoo etc would include "?redirect" on your site.... Second method you could use is their HTTP referer (via $_SERVER['HTTP_REFERER'] ) and see if it set and matches your domain 1. However that is 100% reliable either as not everyone has it set. Quote Link to comment https://forums.phpfreaks.com/topic/177182-redirect-notice/#findComment-934229 Share on other sites More sharing options...
ldoozer Posted October 10, 2009 Author Share Posted October 10, 2009 my website was hacked recently and I found that my htaccess file had been modified to include something that said if coming from google go to another page. I was thinking I could use something similar and send people to a page that has the redirect message and then have a meta redirect on that page to get them to the site, can you see a problem with this idea? Quote Link to comment https://forums.phpfreaks.com/topic/177182-redirect-notice/#findComment-934239 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.