Hi Folks,
I’ve added @joeworkman SEO helper to my site, having watched the long SEO tactics video and meta tags video, both which were super helpful. However, even though I’ve made an ‘error 404 page’ and altered my htaccess file as directed, it’s not working for me. If I enter a garbled address I do get redirected to the right page, but it just fires up a ‘page not working’ error? If I drag the index.php file for the page on to chrome it looks fine… Any ideas why this could be? The page should show up here:
Also, I’ve noticed that if I run the site through web.dev I get the following SEO error: I must be doing something wrong with SEO helper?? I don’t seem to even have a robots.txt file…. eek! (Nice SEO score though! Thanks Joe!)
I’m on my iPad but when I click on the link I get a blank page.
If I enter a non existing page like https://kentlogs.co.uk/not-
I get redirected to the blank page https://kentlogs.co.uk/not-found/.
I would look on the server in that folder and see if there is a error.log file. The blank page and 500 error message is usually caused by a php error on the page.
ok thanks Scott. The file is deffo there on the server and if I ‘edit in transmit’ from transmit ftp client then all the code is there. Not blank. I probably shouldn’t screenshot it in case some of it is Joe’s proprietary code but no question about it being there… I’ll see what the error log says
Great. Many thanks Doug. There’s no rush as hopefully that page won’t be reached anyway but I’m hoping that solving this problem may point to a solution to the ‘robots.txt’ problem, which I’m more worried about for SEO reasons.
I’ll be finishing in about an hour but will be back in tomorrow morning.
Okay,
Now I’m looking at the log message. I see that you are getting several Invalid URI Request.
The URL’s looks like they are "semi absolute since they start with /. That should mean that they would be “relative to the root”. But from the message text in the screenshot, the files are being requested all start with a /../. The .. says to “go up one level” so they are trying to access a directory outside the server root.
My other sites on other servers normally connect straight to the location of the site files but then that could be how Dreamhost works (I didn’t set up the original account). And, the site is working so I guess its correct to be like that.
in RW I have the setting on the ‘advanced’ page set to ‘Relative to page’. Is that correct?
I have a RW page setup with the folder name not-found, (it is an html file not php) and it works fine.
Is there a reason for you using PHP on a 404 error page? Since I can’t see the source for the PHP it would be just a guess on my part. I would start by placing the most simple HTML page out without much of anything on it.
Perhaps having an HTML file instead of PHP you might be able to see something more show up.
Thanks @joeworkman, that worked! I was certain the server was running 7.3! Turns out I’d only upgraded one of my other DreamHost sites instead of all of them! What a numpty!
Sorry to waste your time @teefers Doug… I saw the php folder in the DH server root and it has a 7.3 folder inside that, which made me think I was right about the php version… Just shows me however much I learn about this malarkey, theres still tons of stuff I don’t know!