0

I've got a bizarre issue that is only happening on staging. Locally all urls work correctly.

on staging http://domain.com/archives and http://domain.com/photography/entry_slug both return a 404 page generated by the host see screenshot enter image description here

However if I actually try to visit a page that truly does not exist the craft 404 page shows, which is what I would expect for a real 404 error. For example http://domain.com/foo

enter image description here

This is only my second craft site and I have no idea how to troubleshoot. All help is appreciated.

  • Is /archives supposed to redirect to /calendar? My guess is there is some .htaccess rewrite rule interfering somewhere. – Brad Bell Aug 29 '16 at 21:35
  • @BradBell actually the link is to /calendar I just typed it wrong... there is no redirect going on anywhere. I"m also using the vanilla htaccess that comes with Craft – CreateSean Aug 29 '16 at 21:48
2

Probably your paths are not set up right; or the SERVER_NAME isn't what you think it is, so it's not matching the paths in your general.php

| improve this answer | |
  • @khalwhat I double checked and it's the same. Even used this and copied/pasted to be sure $path = $_SERVER['DOCUMENT_ROOT']; echo $path; - no change still not working as expected. – CreateSean Aug 30 '16 at 13:03
  • So a little more looking and I found a typo in the baseUrl for staging in general.php – CreateSean Aug 30 '16 at 17:25
3

Looking at your screenshots, the host names are different. The cPanel 404 shows mysphotos instead of myphotos.

Probably a typo somewhere in your templates.

| improve this answer | |
  • That's true and odd because the link to that page does not have a typo. Not sure what is causign this redirect. Thanks for pointing that out to me. NOw i have somethign to work with. – CreateSean Aug 30 '16 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.