deepentim Posted February 4, 2016 Posted February 4, 2016 I want to restrict visitors to restrict browsing my website backend directories like: site/m wire/ Anyone please help me. I want to display 404 error when a visitor visits mysite/site/templates/ Infact now when a visitor visits this path it says "Access Forbidden"
adrian Posted February 4, 2016 Posted February 4, 2016 I am curious why you want to change these, but if you really have a good reason, I think the easiest/only option might be to edit the htaccess file in the PW root, or add htaccess files in the sub directories that you want to change the protection on. This should override the protection added by PW's root htaccess file.
LostKobrakai Posted February 4, 2016 Posted February 4, 2016 I just want to add that the access forbidden response is the correct one to return, because the file/folder in the path is certainly not "not found". At least if you want to adhere to the http specification. 1
dragan Posted February 11, 2016 Posted February 11, 2016 By default, if I try to access http://mysite.com/site/templates/ or /wire, I get an error 404. So I guess you don't need to do anything further. As for a folder m/ (which must be a custum folder you created, i.e. this is not part of PW core) - just turn off directory listing in your .htaccess, or do a 403. However, if you reference content from such a folder m/ (e.g. a PDF, an image or whatever) in your regular PW site, a 403 will block access too...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now