<p>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 <code>general.php</code></p>

CC BY-SA 3.0
2016-08-30T13:03:42.843Z
@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
CC BY-SA 3.0
2016-08-30T17:25:54.487Z
So a little more looking and I found a typo in the baseUrl for staging in general.php
CreateSean
CC BY-SA 3.0
2016-08-29T22:02:25.407Z
2016-08-29T22:02:25.407Z
andrew.welch
<p>Looking at your screenshots, the host names are different.  The cPanel 404 shows mysphotos instead of myphotos.  </p>

<p>Probably a typo somewhere in your templates.</p>

CC BY-SA 3.0
2016-08-30T17:18:15.770Z
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
CC BY-SA 3.0
2016-08-30T16:23:04.603Z
2016-08-30T16:33:33.190Z
2016-08-30T16:33:33.190Z
Mike Pringle
<p>I've got a bizarre issue that is only happening on staging. Locally all urls work correctly.</p>

<p>on staging <a href="http://domain.com/archives" rel="nofollow noreferrer">http://domain.com/archives</a> and <a href="http://domain.com/photography/entry_slug" rel="nofollow noreferrer">http://domain.com/photography/entry_slug</a> both return a 404 page generated by the host see screenshot
<a href="https://i.sstatic.net/Fct15.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Fct15.png" alt="enter image description here"></a></p>

<p>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 <a href="http://domain.com/foo" rel="nofollow noreferrer">http://domain.com/foo</a></p>

<p><a href="https://i.sstatic.net/4rIJA.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4rIJA.png" alt="enter image description here"></a></p>

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

CC BY-SA 3.0
2016-08-29T21:35:43.713Z
Is `/archives` supposed to redirect to `/calendar`?  My guess is there is some `.htaccess` rewrite rule interfering somewhere.
Brad Bell
CC BY-SA 3.0
2016-08-29T21:48:44.333Z
@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
<error><404><404-page>
404 problems, staging only
# 404 problems, staging only

(Asked by: username_0 on 2016-08-29)

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](https://i.sstatic.net/Fct15.png)](https://i.sstatic.net/Fct15.png)

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](https://i.sstatic.net/4rIJA.png)](https://i.sstatic.net/4rIJA.png)

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

**Tags:** error, 404, 404-page

> **Comments:**
> **username_1**: Is `/archives` supposed to redirect to `/calendar`?  My guess is there is some `.htaccess` rewrite rule interfering somewhere.  
> **username_0**: @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  

---

## 2 answers

### Answer by username_2 on 2016-08-29. Score: 2 | Accepted answer

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`

> **Comments:**
> **username_0**: @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.  
> **username_0**: So a little more looking and I found a typo in the baseUrl for staging in general.php  

---

### Answer by username_3 on 2016-08-30. Score: 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.

> **Comments:**
> **username_0**: 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.  

---

