srg Posted February 29, 2016 Share Posted February 29, 2016 Hello, I want to perform a redirect inside my template. I know how to do it using php tags (header) and also JS but I find both ways unacceptable. Is there any other way to perform this task more gently? Thank you. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted February 29, 2016 Share Posted February 29, 2016 but I find both ways unacceptable. how exactly? below you can find three available methods: PHP: <?php header("Location: http://www.targeturl.com"); ?> Javascript: <script type="text/javascript"> window.location = "http://www.targeturl.com/"; </script> HTML: <meta http-equiv="refresh" content="0; url=http://www.targeturl.com/"> 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted March 2, 2016 Share Posted March 2, 2016 As sentq shared those are your methods, I'd recommend HTML or PHP. Javascript of course won't work if a user has javascript disabled (rare these days but will still happen from time to time) 0 Quote Link to comment 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.