1

I just realized that when I go to website.com/faljalsdfkj, it should cause a 404 and take me to the 404 page. I have this same setup on ann older site and it seems to be working correctly, but Can't figure out what's different. I don't have strict urls turned on because I need this setting for a feature.

After viewing this thread:

404 ErrorDocument returns home page incorrectly

it seems that perhaps its my apache configuration? Or is there another setting im missing?

Any ideas would be huge. Thanks!

2

Loading the home page in 404 mode is EE's default functionality. Unless you configure/code otherwise this is just what happens.

Can't you add this to your home page template?

{if segment_1 !=""}
  {redirect="404"}
{/if}

This assumes you have a template specified as your 404 template in the area of the CP that Alex provided a screenshot of.

1
  • Nice-This should work. Thanks!
    – Jordan
    Mar 18 '14 at 16:22
2

First, make sure you have enabled "Strict URLs" and chosen you 404 template in in the control panel.

Control Panel Location: Design > Templates > Template Preferences

enter image description here

Take a look at Global Template Preferences in the ExpressionEngine User Guide for more information.

1
  • I can't enable strict URLS because at this time I am using segments for returning on errors and success form submissions. If it was contact/success then it would trigger a 404. I have an older EE site - 2.5 that works (without strict urls). So im trying to figure out why it is the index that is treated as the 404.
    – Jordan
    Mar 18 '14 at 5:37

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.