• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


would be a FAIL.

Not being very familiar with PHP yet, I tried


This did not work.

Can anyone out there point me toward the proper way to do this?

Thanks a ton!

Javascript redirection might be useful one. Give it a try:
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:
echo '[removed][removed]="http://www.your-site.com/index.html";[removed]';

I *hate* when it removes code... are you suggesting something like

document.location.href = "url";

( pretend the [ are < )

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.


Why not try header('Location: http://www.example.com/index.html');

How about this?
redirect('index', 'location');
Note: Just remove .html extension from your first post and you'll be fine

[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! :-)

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.