How can I return 'The page you requested cannot be found!' when visitor goes to my backend folders like /catalog, /system.
How to redirect user to default Page Not Found page instead of 403 error?
Try adding to your .htaccess something like:
Code: Select all
RewriteRule ^catalog/ - [L,R=404]
RewriteRule ^image/ - [L,R=404]
RewriteRule ^system/ - [L,R=404]
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Legendary Member
You can set the 403 error state to use the same page as the 404 uses. Ie:
As long as your directory is properly denied, it will trigger a 403 error state with a "not found" page. This is better than "you are forbidden" since, obviously, forbidden things hint that there is something worthwhile there to brute.
Code: Select all
ErrorDocument 404 /index.php?route=error/not_found
ErrorDocument 403 /index.php?route=error/not_found
https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.
Who is online
Users browsing this forum: No registered users and 6 guests