How do I create a php file “redirect.php”
That takes 1 input parameter “URL”, have to check the URL
Page is not dead before rediecting?
Example
1 user clicks on link
http://domain.com/Redirect.php?URL=http://example.com/page1.php
2 redirect.php checks if page (http://example.com/page1.php) is ok!
3 if ok redirect user to http://example.com/page1.php
4 if not ok display message “not in service”
You can use CURL to access the web page in code, and see if you get a valid result.
However, I am not seeing any benefit to doing this. Either it’s down and they get your ‘not in service’ message, or it’s down and they get the browser message that it’s down… In the process, you’ve doubled the traffic from your site to the target site unnecessarily.