We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14730
    • 34 Posts
    Hi there,

    I used .htaccess to create friendly url’s. Flicked the proper switches and it all works fine; but...

    When I enter a non-existing url (mysite.com/blah/blah), the browser displays my homepage (mysite.com).
    I want to redirect my visitors to 404 page; either physical on my server or as a resource.

    I thought the following line in my .htaccess would do the job, together with a 404.htm document in my root folder:
    ErrorDocument 404 /errors/404.htm

    But it didn’t work...

    Please help me resolve this issue! Thanks!

    PS Why a 404 page? I don’t want to direct users to my homepage on a typo and I don’t want google to think I have duplicate pages.
    PPS A solution where I can edit the error page in the manager would be best.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Create your "not found" resource, and set it to be the not found resource in your site configuration.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org