Forum
Navigation Links on PHP Blog Page to HTML pages Not Working
I'm admittedly new to Perch, but have looked at all the navigation info you have on your site and am stuck.
As you can see at https://resumerelief.com/blog/post.php?s=2013-02-13-free-linkedin-webinars-for-job-seekers (just started on Perch this weekend, so I still have a lot of cleanup work to do), when I click on my navigation links to the left (the welcome, my process, services menu, etc.) I get the message: Not Found The requested URL /blog/index.html was not found on this server.
This makes sense because my index page is not a sub page to my blog page, but I can't figure out what direction/code there is within my PHP page or templates or navigation's items page that's making it do this and how I can fix that.
Not sure if it's helpful, but the code within my HTML page for these navigation links is:
<tr> <td align="right" valign="middle" class="mainlinks1"><a href="index.html" class="mainlinks1">welcome</a></td> </tr> <tr> <td align="right" valign="middle" class="mainlinks"><a href="faq-resume-service-process.html" class="mainlinks">my process</a></td> </tr> <tr> <td align="right" valign="middle" class="mainlinks"><a href="services.html" class="mainlinks">services menu</a></td> </tr><tr> <td align="right" valign="middle" class="mainlinks"><a href="feedback.html" class="mainlinks">client kudos</a></td> </tr> <tr> <td align="right" valign="middle" class="mainlinks"><a href="faq.html" class="mainlinks">faqs</a></td> </tr>
Also, since my only need for Perch was to add the blog, I haven't uploaded any of my other website pages into my Perch Pages dashboard. I didn't think this was necessary, but if it is, then please let me know.
Thanks so much!
Have you updated the blog post path under Settings in the Perch Admin, in order that it is correct for your site?
I very much appreciate your quick response, Rachel, but am still confused.
I have not updated the blog post page path, as it's the default /blog/post.php?s={postSlug} , and am confused as to the relevance of that, as the links to my blog index and and my blog pages are not the issue. They open just fine.
It's my navigation bar links from my original website design that are now not going to their correct html pages.
If you're a little more specific I might be able to figure this out.
If you are talking about your regular site links then these need to be root relative so they will work in a subdirectory. I'm not sure how this is anything to do with Perch, is this a navigation template or just hardcoded HTML?
They are hardcoded links:
the code within my HTML page for these navigation links is: <tr> <td align="right" valign="middle" class="mainlinks1"><a href="index.html" class="mainlinks1">welcome</a></td> </tr> <tr> <td align="right" valign="middle" class="mainlinks"><a href="faq-resume-service-process.html" class="mainlinks">my process</a></td> </tr> <tr> <td align="right" valign="middle" class="mainlinks"><a href="services.html" class="mainlinks">services menu</a></td> </tr><tr> <td align="right" valign="middle" class="mainlinks"><a href="feedback.html" class="mainlinks">client kudos</a></td> </tr> <tr> <td align="right" valign="middle" class="mainlinks"><a href="faq.html" class="mainlinks">faqs</a></td> </tr>
They still work on all of my other website pages, but, for example, when I'm at https://resumerelief.com/blog/ and say I try to click on my faq navigation link from that page, I get this message:
Not Found
The requested URL /blog/faq.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at resumerelief.com Port 80
This is why I'm so confused.
Why/how are my original HTML link directions somehow getting overwritten by my newly installed Perch blog pages/templates?
The way this error message reads it's as if it's trying to find my faqs page within my blog folder, for whatever reason, that's why I'm wondering what Perch code could be causing this.
Thanks again. I'm baffled.
You need to make your links root-relative. Instead of:
use:
Thanks for the tip, Drew, but I'm still feeling a little like a moron.
I did what you mentioned and still get the error page saying:
Not Found
The requested URL /blog/“/faq.html" was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at resumerelief.com Port 80
You have some weird characters in there. You just need to make your links root relative. If faq.html is not in the blog folder then your link would be /faq.html
This really doesn't appear to be Perch related - just regular HTML.
Oh how I wish adding the /'s would do it, but no such luck.
I've been looking at this code way too long today, so I'll hope someone else has a suggestion, but for tonight I'm going to give my brain a rest!
Ok, when you get back to it, post the code that you currently have, or better still, post a link to where it is online.
My apologies for consuming your time, but adding the /'s did work, it was just that I hadn't noticed that when I added those, my " became slanted and fixing those was all it took.
Thanks again, Drew and Rachel - I'm sure you'll hear from me again!