404's Redirecting to Login Page

Permalink 1 user found helpful
Hi All

I am experiencing an odd problem with a site we recently put live. All of the 404 errors are redirecting to a login page (with a 301 redirect). If you then login in and try again, you then just get sent to a blank white page that says:

Page Forbidden
You are not authorized to access this page.
Back to Home.


This is instead of my custom page_not_found.php that I have generated.

I was assuming that the issue was coming from my code somewhere but I have tried completely disabling my theme and I still have the same problem. This problem exists in both dev and prod environments so its not environment specific. In my dev, my htaccess file is just the basic one generated by concrete when you enable pretty URLs so there is no redirects coming from there.

I am using Concrete 8.2.1 running on PHP 7 (separate sub versions in both environments).

I am at a bit of a loss of where to look to try and resolve this so any advice would be greatly appreciated.

Many thanks
David

bvcreative
 
jirosworld replied on at Permalink Reply
jirosworld
Well... Did anyone ever figure this out? I have the same issue. Never had this before; I just created a custom page_not_found page but it doesn't get recognized; all permissions seem correct too.
bvcreative replied on at Permalink Reply
bvcreative
Hi

Unfortunately not, I have spent countless hours debugging and removing bits of code but I haven't been able to figure out where the problem is coming from as yet unfortunately.

I would love to resolve this though if anyone else has any input.

All the best
David
jirosworld replied on at Permalink Reply
jirosworld
I actually solved it with a very odd workaround; I'm working on a Concrete5 site that was made by another developer; I found out that (when viewing all the Single Pages in Dashboard GUI) that the page_not_found page was deleted from the dashboard and completely removed; very odd!
The previous developer might have deleted it from the sitemap by mistake.
So I just created a new single page within the dashboard and its default URL (also set it to be invisible in Nav and Pagelists) and now it works and redirects perfectly to my custom 404 page.

Turns out that Admins can delete A LOT from the Sitemap and move important system pages to the trash.
bvcreative replied on at Permalink Reply
bvcreative
jiropii, your a superstar!! That was it exactly it, no idea how or when that got deleted but I have re-added it and its working again now. Many thanks

All the best
David
jirosworld replied on at Permalink Reply
jirosworld
Yay! I'm happy for you!