Could someone explain to me what can I do with .htaccess file, how to make this file and how to use it? I want to secure my web pages from which I have access to MySql database.
Thanks
Mare
Printable View
Could someone explain to me what can I do with .htaccess file, how to make this file and how to use it? I want to secure my web pages from which I have access to MySql database.
Thanks
Mare
From http://www.apache.org/docs/configuring.html:
.htaccess Files
Apache allows for decentralized management of configuration via special files placed inside the web tree. The special files are usually called .htaccess, but any name can be specified in the AccessFileName directive. Directives placed in .htaccess files apply to the directory where you place the file, and all sub-directories. The .htaccess files follow the same syntax as the main configuration files. Since .htaccess files are read on every request, rather than only at server startup, changes made in these files take immediate effect.
To find which directives can be placed in .htaccess files, check the Context of the directive. The server administrator further controls what directives may be placed in .htaccess files by configuring the AllowOverride directive in the main configuration files.
It's a text file.
Anarchos you could have just refered the poor soul to the apache manual.
If my memory server me right that is the exact description Apache gives of the .htaccess files in the official manual.
and by the way the manual for apache may be found at http://httpd.apache.org/docs/ you may however find this a little over whelming at first.
With the .htaccess file, you can do many things like setup a custom error page, change your default page extension, etc.
How can I change my default file to index.php? Now it's index.html.Quote:
Originally posted by mjames86
With the .htaccess file, you can do many things like setup a custom error page, change your default page extension, etc.
Mare
Mad Onion: hence the "From http://www.apache.org/docs/configuring.html: "
He did do that...Quote:
Originally posted by mad-onion
Anarchos you could have just refered the poor soul to the apache manual.
If my memory server me right that is the exact description Apache gives of the .htaccess files in the official manual.
and by the way the manual for apache may be found at http://httpd.apache.org/docs/ you may however find this a little over whelming at first.
BTW, I have found the apache manual to be very confusing...I wish someone would make a userfriendly site supporting apache.
I know what you mean Nate, it is like one big fat unorganised compilation of information.
There would appear to be little or no logic to its layout.
Perhaps that could be an idea for improvements on the nextr release.
Just imagine it...
Apache 1.3.6.13
Major Updates:
- New Manual Layout
kinda funny really
lol, yea that would be good
I've been browsing around and managed to get to this interesting tutorial about .htaccess file: http://www.coolresources.com/article...d/htaccess.htm. mh8759, the tutorial can explain how you can change your default file from index.html to index.php. And jumpthru, I think the site is more user-friendly, too. :) Hope that link also helps others who want to know a bit more about the .htaccess file. :)