I would like to redirect a page. Originally I used the header command in order to redirect. But sometime ago I found that it does not work. What is another conmnand in order to redirect a page? I developed it by using the PHP language.
2
-
4It would be better to ask why it's not working sometimes (because it should be) and post your code. header() is the best way of redirecting a browser to another page.Andy E– Andy E2010-08-24 09:57:34 +00:00Commented Aug 24, 2010 at 9:57
-
What do you mean 'does not work'? It throws an error message or simply doesn't doing anything. I think a command must work at anytime. (or at least should throw an error message).fabrik– fabrik2010-08-24 09:59:45 +00:00Commented Aug 24, 2010 at 9:59
Add a comment
|
1 Answer
Would you buy a new car when your old one runs out of gas? I doubt so.
When you find that something doesn't work, you have to repair it, not start looking for something else.
Especially if you're doing right way at the moment.
HTTP header Location: is the only reliable and standard way to do a redirect.
There is always an error message, to tell you what's going wrong.
You have to just read this message. If it isn't going to screen, most likely it can be found in the error_log