.htaccess

codynanney's Avatar
Newbie Member
Im not sure if this is the right section to post this but I will try it. I am having a really hard time trying to set up a ,htaccess for my site so I have a couple of questions. First if I want to protect a single page where would I put the .htaccess file? Inside a folder with the page? or somewhere else. Second when I am creating my full server path do I have to include the path through the folders like i would a url or is this something completely different? I can use any help I can get.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
I have moved it to the last section and as far as I know of .htaccess it should always go into the root folder of your web server but that is not a restriction and you can put them in any folder you wish to.
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
1) You have to put the .htaccess file in the directory where the file you want to protect resides.
2) URL path & Server filesystem path usually are quite diferrent, for example you have hosted your pages on a shared server for the domain xxyy.com, so your server filesystem path might look like /share/xxyy.com/public_html/index.html while the URL looks like http://xxyy.com/index.html
0
urstop's Avatar, Join Date: Oct 2007
Contributor
.htaccess can be placed either in your root directory or directly in the folder that contains the file to be protected.

A .htaccess that is a root directory can have settings that apply to all the subdirectories.

and

A .htaccess that is a root' sub directory can have settings that apply only to itself.