• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem redirecting to an html page outside my application

#1
[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');
redirect('index.html');

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!

#2
[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]';

#3
[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]';
[/quote]

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

[script]
document.location.href = "url";
[/script]


( pretend the [ are < )

#4
[eluser]Sumon[/eluser]
Exactly.
Sorry for my messy code. actually this is my first post of JS.

#5
[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!

#6
[eluser]Dr.Dan[/eluser]
Why not try header('Location: http://www.example.com/index.html');

#7
[eluser]Weblizard[/eluser]
How about this?
Code:
redirect('index', 'location');
Note: Just remove .html extension from your first post and you'll be fine

#8
[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-2019 MyBB Group.