Post by dpn » Sun Apr 03, 2016 10:36 am

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?

dpn
Newbie

Posts

Joined
Sun Apr 03, 2016 2:52 am

Post by paulfeakins » Mon Apr 04, 2016 5:42 pm

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]

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Active Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by dpn » Tue Apr 05, 2016 6:30 am

Soory, it did not help me.

dpn
Newbie

Posts

Joined
Sun Apr 03, 2016 2:52 am

Post by Dhaupin » Wed Apr 06, 2016 2:47 am

You can set the 403 error state to use the same page as the 404 uses. Ie:

Code: Select all

ErrorDocument 404 /index.php?route=error/not_found
ErrorDocument 403 /index.php?route=error/not_found
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.

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA
Who is online

Users browsing this forum: No registered users and 5 guests