Go4Expert (http://www.go4expert.com/)
-   Web Development (http://www.go4expert.com/forums/web-development-forum/)
-   -   .htaccess (http://www.go4expert.com/forums/htaccess-t7975/)

codynanney 23Dec2007 06:48

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.

shabbir 23Dec2007 09:38

Re: .htaccess
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.

pradeep 23Dec2007 12:08

Re: .htaccess
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

urstop 27Dec2007 12:18

Re: .htaccess
.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.


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

All times are GMT +5.5. The time now is 09:05.