Jump to content

Make Site directory unaccessable


deepentim
 Share

Recommended Posts

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"

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...