Skip to content

Commit

Permalink
Update securing-modx.md - add 404 page in .htaccess (#529)
Browse files Browse the repository at this point in the history
add 404 page in .htaccess
  • Loading branch information
artemsites authored Nov 20, 2024
1 parent a331266 commit 977200b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions en/getting-started/maintenance/securing-modx.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
RewriteRule ^(\.(?!well_known)|_build|_gitify|_backup|core|config.core.php) /index.php?q=doesnotexist [L,R=404]
```

To show your error page, you need to specify the path to it in .htaccess, for example:

```
ErrorDocument 404 /404
```

For NGINX, add the following to your web rules which will pass the rewrites to the MODX error handler:

```
Expand Down

0 comments on commit 977200b

Please sign in to comment.