Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Site returning 200 response when 404 should be provided #6

@jackdpeterson

Description

@jackdpeterson

Matthew, thanks for writing this blog module!

I'm still fiddling with it in my spare time and encountered what appears to be some kind of configuration error. If I navigate to http://SomeImplementationOfThisBlogModule.com/Some_Missing_Page The status code being provided is a 200 OK. I would expect 404 response code. It looks like the module.config.php file does include reference to a 404 handler; however, something is a bit funky -- as it is sending that bugger of a 200 OK no matter what.

module.config.php -- Lines 47-59:
'router' => array(
'routes' => array(
'default' => array(
'type' => 'Regex',
'options' => array(
'regex' => '/.*',
'defaults' => array(
'controller' => 'PhlySimplePage\Controller\Page',
'template' => 'pages/404',
),
'spec' => '404',
),
),

Looking at PhlySimplePage/PageController.php Lines 159-193 seem to imply that a 404 would be generated... but for some reason it isn't. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions