Forum Moderators: phranque

Message Too Old, No Replies

What does htacess do?.

         

dbarasuk

6:22 pm on Aug 17, 2009 (gmt 0)

10+ Year Member



Dear,

To test my php pages, i always save them in htdocs.
I once uploaded php pages in a folder of same name on an american server but i could see the content of the container folder for my pages if i typed in the browser the path to my pages(which of course is a terrible mistake for a user to see all the site pages from a path). I could see something saying that my pages sould have been saved in an htaccess folder. But as i was using a free acount i could not save my pages there.

So my question is where are the pages saved? In htdocs as when working offline or in htacess?

I never see the htaccess from apache when iam developping my pages.

Please help me to know.

g1smd

8:44 pm on Aug 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



.htaccess is a file that lists parameters that configure the webserver. Filenames that begin with a dot are usually 'hidden' from directory lists by most FTP clients. There's usually an option to show those filenames, though most of the time you have no need to see them.

Your site files go in a folder called /www/ or /htdocs/ or similar. The name depends on the default name used by the server software itself. It can be called whatever you want; you could call it 'alan' if you wanted to. The .htaccess file for that site would also go in that folder.

tangor

8:48 pm on Aug 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Insure that you have a proper index file declared and that folder options are turned OFF to prevent directory views.

jdMorgan

9:40 pm on Aug 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Placing the directive
 Options -Indexes 

in the Web root directory (i.e. "home page" directory) .htaccess file will stop directory indexes from being displayed, and return a 403-Forbidden response.

More about .htaccess files:
[httpd.apache.org...]

Jim