I want to redirect to an external url immediately on loading a template. EE’s redirect inserts the domain name, so that doesn’t work. I have a javascript solution but would like to avoid using JS if I can.
Any suggestions?
Jonathan
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
March 24, 2012 2:56pm
Subscribe [5]#1 / Mar 24, 2012 2:56pm
I want to redirect to an external url immediately on loading a template. EE’s redirect inserts the domain name, so that doesn’t work. I have a javascript solution but would like to avoid using JS if I can.
Any suggestions?
Jonathan
#2 / Mar 24, 2012 11:53pm
http://devot-ee.com/add-ons/detour-pro It’s particularly good if you have quite a few redirects etc.
#3 / Mar 25, 2012 1:24am
I’ll take a look at your reference, but I found a nice simple html-only solution:
<meta http-equiv=“Refresh” content=“0; url=”....”>
So, thanks for your help, and let’s consider the thread closed.
#4 / Mar 25, 2012 1:28am
yes, meta redirection will be nice ...
#5 / Mar 25, 2012 9:05pm
You can also enable PHP on input (or output if that is necessary):
<?php
header('Location: <a href="http://www.example.com/path/to">http://www.example.com/path/to'</a>);
exit;
?>#6 / Mar 26, 2012 4:56am
Could also use .htaccess to create a redirect.