Jump to content

htaccess


Ninjakreborn

Recommended Posts

I was wondering about something.
I have recently started using htaccess a lot more than I ever thought i would, just for smaller things even.  I have started password protecting temporary things using htaccess, if it's anything permanent I normally use other types of authentification to make sure they need access to that folder.  For now, I was wondering, if I password protect specific pages will that allow the browser to get those pages.
For instance, I just recently installed php my admin, on a raggidy server configuration (I hate his webhost but he wanted to stick with it)
Now I am wondering, right now I password protected it, obviously it worked. 
What if I decided to password protect other stuff, like if I wanted to entirely  keep people from going into my framework, if I htaccess it, then anytime someone goes to /master folder or any sub-folder of that, it will prompt for username and password, keeping people from snooping through my directory.  What I was wondering, is, will it hurt anything.  I mean, if I password protect
/master
then all my other directories will be too (css, and includes, and processors, and images)
I am just wondering will that be bad.
Even then, if i just password protected the config folder inside it, would that allow the pages to get to my include, even though the directory was password protected.
I want to prevent people from messing with those folders???
Link to comment
Share on other sites

[quote]Turn directory listings on or off

Normally when you navigate to a directory or folder on this web server, the files in that directory will not display because directory listings are turned off by default. If you do not have a file named index.html or other acceptable home page name, you will get an error that indicates you do not have permission to view that directory. However, if your site was migrated to this server from another EasyStreet server, we may have enabled directory listings since they were allowed in the previous environment.
Turn directory listings on

  1.

      Create a plain text file named .htaccess with the following line or add to an existing .htaccess file:

      Options +Indexes
  2. Upload this .htaccess file to your / directory. This is the level above public. Note: If you already have a file named .htaccess there, simply add the above lines to that file rather than replacing it.

Turn directory listings off

  1.

      At the top level of your site, /, find the file named .htaccess and remove the line which reads:

      Options +Indexes
  2. Upload this modified .htaccess file to your / directory. This returns your site to the default behavior, which has directory listings turned off.
[/quote]

Actually I think this was what I was wanting.  This is one thing I was going to start using, this might help, what about other things.  Like the passwording.

This is my idea, I was going to build an htaccess file into the /master folder of my framework.  This would allow me to actually have it always password protected on servers that worked with htaccess.
Then I could have another htaccess file, I move to the upper level, that cuts off magic quotes, and some other things I prefer having set specifically.  As well as the directive for it to stop showing the directory, that is what annoys me, are these going to be good ideas, or could any of this cause problems later?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.