Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi all,

I hope somebody might be able to give me some pointers here - I've been scratching my head with this one for a while, and have already wasted far too much time on it.

I've setup a nice site, turned on pretty urls, and the very last thing I did was to configure the custom 404 page. I did the whole development on a local MAMP setup, and everything works fine locally - including the 404 redirections. I setup the 404.php as a template managed by Couch, as I wanted it to embed headers and footers found across the rest of the site.

Once I transported the site to the live server (an OS X Mavericks Server), everything worked absolutely perfectly, except for the custom 404 error page: the error page only kicks in if the url ends in "*.php". If I type a url that ends with a "/" or with no extension, then I get nothing: the server seems to go into an endless loop, and eventually the connection drops - and the browser gives a 'time out' or 'connection dropped' error.

I thought the problem could be that I was using a templated 404, so I deleted the 404 template, accessed the admin backend, and made sure that Couch saw it was gone (and deleted it from the backend, too). I then did the following to try and troubleshoot it:

1) I re-generated the htaccess page, so there was no 404 redirection there - the ErrorDocument directive was commented out. Without any influence from Couch, or from the haccess file, the server immediately shows its default 404 error, as it should.

2) I then put a plain 404.php file on the root of the site, but did not yet alter the htaccess file. I believe that in this setup, if I try to access a cloned page that doesn't exist, Couch should kick in, and already give me this custom 404 page. But it doesn't: if I try to access a cloned page with a .php extension, I get the server's default 404 error (not my custom one). Couch is not kicking in at all. If I try to access a cloned page that ends in "*.html", or a url that ends in "/", then it times out, as described above.

3) If I uncomment the ErrorDocument directive in the htaccess file, and then try to access a .php file, Couch kicks in immediately, and I do get the custom 404 page. But if I try to access any other type of url, as described above, I get a time out.

What is most puzzling, is that in my local setup, everything is fine. The only difference between my local setup and the live server, is that the live server user a secure connection (https). I've tried turning that off, though, to see if that was the problem, and there was absolutely no difference: redirection only works for ".php" urls, and for everything else, it times out in an endless loop...

Any suggestions at this point would be extremely welcome. I'm pulling my hair out! :(
Hi luxlogica,

I am sorry you had to go through all that trouble.

Evidently, you have done a fair bit of troubleshooting already :)
Could you grant me temp access (FTP + Couch) to your server please?
My turn to pull off some hair :)
2 posts Page 1 of 1
cron