Created
September 15, 2010 17:29
-
-
Save zuf/581094 to your computer and use it in GitHub Desktop.
Complete PHP + JavaScript + HTML redirect solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // | |
| // Complete PHP + JavaScript + HTML redirect solution | |
| // | |
| $url = 'http://www.example.com/'; | |
| header("Location: $url"); ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |
| <html> | |
| <head> | |
| <script type="text/javascript">//<![CDATA[ | |
| location.replace("<?php echo $url; ?>"); | |
| //]]></script> | |
| <noscript> | |
| <meta http-equiv="Refresh" content="0; URL=<?php echo $url; ?>"> | |
| </noscript> | |
| </head> | |
| <body> | |
| Please follow this link: <a href="<?php echo $url; ?>"><?php echo $url; ?></a>. | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment