Page 2 of 3

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 10:35 am
by jaoudestudios
Jordi wrote:ok, but neither one of the two error.php files seems to be called when a page is not found. you can test it at http://www.catalansoft.com and adding to this urs whatever file name you can think of. the browser's url text box starts to go mad until it is manually stopped.
I added to the url and it just redirected me back to the homepage.

NB: frames are very bad if you want to be listed in google!

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 10:41 am
by Jordi
You're right. There was an error in the php file. Some double quotes now changed to single quotes.
.. but a non-existing page still not showing it :?

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 10:58 am
by jaoudestudios
And you are putting your .htaccess file in the root of your website? Which will be along side your index.php file.

Because what is strange is, if I append to your url it just redirects me to the home page.

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 11:02 am
by jaoudestudios
Ahh, you are using frames! and your inner frame is remote, right? Just checked, they must be as they have different IPs. Which server are you uploading the .htaccess file to? To be honest I have never used frames, so I am unaware of their limitations - I just know they are very bad for indexing by google.

I tried this url http://www.catalansoft.com/nopage.php and I get this source code...

Code: Select all

 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Catalan Soft</title>
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</head>
    <frameset frameborder="0" framespacing="0" border="0" rows="100%,*">
        <frame name="MYTOPFRAME" src="http://jordiserres.homeip.net/nopage.php" noresize>
        <noframes>
            <body>
           <h1>Catalan Soft</h1>
           <br>
       <br>
       <br>
       Click here to enter <a href="http://jordiserres.homeip.net/nopage.php">http://jordiserres.homeip.net/nopage.php</a>
           <hr>
| Domain Name Registration and Domain Name Forwarding by <a href="http://www.mydomain.com">mydomain.com - Register your domain name</a>
        </body>
        </noframes>
    </frameset>
 
</html>
 
 
 

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 11:11 am
by Jordi
No, I'm not using them.
The code you posted is the one at the server hosting my domain, which redirects to my server at home, where there are no frames at all.

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 11:19 am
by jaoudestudios
Jordi wrote:No, I'm not using them.
The code you posted is the one at the server hosting my domain, which redirects to my server at home, where there are no frames at all.
Just to clarify....
This is the domain I should be looking at/testing on...http://jordiserres.homeip.net/flightschool/? (continuously redirects)
Not http://www.catalansoft.com? (because this does not redirect it calls in using frames) (redirects to homepage - I think due to frames)

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 11:22 am
by jaoudestudios
Jordi wrote:

Code: Select all

 
ErrorDocument 404 http://jordiserres.homeip.net/flightsch ... .php?e=404
 
Try removing the ?e=404 and see if that makes a difference.

The infinite loop keeps appending the url with the folder name (/flightschool), so I think it is working (i.e. your server is setup to use .htaccess files) but something little is not right.

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 11:35 am
by Jordi
Just to clarify....
This is the domain I should be looking at/testing on...http://jordiserres.homeip.net/flightschool/? (continuously redirects)
Not http://www.catalansoft.com? (because this does not redirect it calls in using frames) (redirects to homepage - I think due to frames)
You'll see that both addresses eventually lead to the same landing page. That's o.k.
The first one is the 'real' address, of my home-located server. The second one is the 'public' address, which is hosted at http://www.mydomain.com, which redirects to my home server.
Try removing the ?e=404 and see if that makes a difference.
I tried it, and makes no difference.

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 11:54 am
by jaoudestudios
What OS is your server running?

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 12:00 pm
by Jordi
My server is running linux, using Apache and MySql

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 12:02 pm
by jaoudestudios
Jordi wrote:My server is running linux, using Apache and MySql
ok, good :) , just checking. For a moment I had a bad feeling you were running a windows server.

Time to dive a little deeper. I will compare your httpd.conf file to mine and let you know.

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 12:58 pm
by jaoudestudios
Where are your files located on your linux server? (eg /var/www/....)

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 1:03 pm
by Eran
Does the .htaccess file in the script directory has the proper AllowOverride settings? (AllowOverride All)
http://httpd.apache.org/docs/2.0/custom-error.html

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 1:04 pm
by Jordi
var/www/flightschool is the main folder, where .htaccess, index.php, and error.php are.
there are four folders which classify different file contents: code, css, images and miscellaneous files.

Re: Custom 404 error page

Posted: Wed Jan 14, 2009 1:06 pm
by Jordi
Settings for this file are (octal) 644, if that's what you mean