Strange inability to re-direct to PHP page

software development


A short while ago, web site I’m developing suddenly started to give me “404 Not Found” errors when it goes to PHP pages…but only for the first time it tries to go to that page. When I refresh the browser (Internet Explorer), the page loads fine so the page is actually there, just not getting served with the first request.

I tried it in Firefox and I see a stray
character at the end of the URL. When I delete the trailing
things work. I’m not sure why the trailing
is getting inserted.

It’s very strange and any thoughts and help would be greatly appreciated!


Well it’s not strange because you can encode device control characters in a URL string. Unless you really mean to say it is a
HTML tag you see and not a CR or LF character. Either way you’re going to need to review your PHP code or whatever it is that generates the HTML.

Customer since 2000 :cool:


Actually, it is strange because I am not encoding any control characters in the links.

In fact, this even happens to the home page, index.php - when the user types there is an implicit redirect to index.php and, even then, stray characters are appended.

And, also, this only started happening last week - everything was ok prior to that and no relevent changes were made.

Again, any help is appreciated for this strangeness.


A link to your site ?


Ah - thanks for asking! In the process of creating a link to a representative part of the site (my client didn’t want me to post a link before the site was ready to go live although I needed to solve this to make it ready but, oh well…), I found the problem and it was my error (of course). I had an include file that did a bunch of overhead work, including re-directing if a session variable was not defined and that re-direction caused an error…but only on the first time through, which was confusing but that is when the session variable was not defined. Thanks again!