Problem redirecting to an html page outside my application |
[eluser]Jay Turley[/eluser]
In my root, there are two files: index.html // the site index page application.php // the CI controller for dynamic portion of site After performing certain tasks, I wish to redirect to index.html Obviously, using Code: $this->load->helper('url'); would be a FAIL. Not being very familiar with PHP yet, I tried Code: http_redirect('/index.html'); This did not work. Can anyone out there point me toward the proper way to do this? Thanks a ton!
[eluser]Sumon[/eluser]
Javascript redirection might be useful one. Give it a try: Code: echo '[removed][removed]="http://www.your-site.com/index.html";[removed]';
[eluser]Jay Turley[/eluser]
[quote author="Sumon" date="1221642581"]Javascript redirection might be useful one. Give it a try: Code: echo '[removed][removed]="http://www.your-site.com/index.html";[removed]'; I *hate* when it removes code... are you suggesting something like [script] document.location.href = "url"; [/script] ( pretend the [ are < )
[eluser]Sumon[/eluser]
Exactly. Sorry for my messy code. actually this is my first post of JS.
[eluser]Jay Turley[/eluser]
Okay, thank you for the suggestion. I may do that, but I was hoping there was some solution out there involving PHP so I don't have to depend on JS support in the client browser. Thanks!
[eluser]Dr.Dan[/eluser]
Why not try header('Location: http://www.example.com/index.html');
[eluser]Weblizard[/eluser]
How about this? Code: redirect('index', 'location');
[eluser]Jay Turley[/eluser]
[quote author="Dr.Dan" date="1221650237"]Why not try header('Location: http://www.example.com/index.html');[/quote] And it's Dr. Dan FTW!! Beautiful. And thank you very much! :-) |
Welcome Guest, Not a member yet? Register Sign In |