What is htaccess?

What is htaccess? Why do we use this and Where?

Questions by devinaga

Showing Answers 1 - 15 of 15 Answers

dineshsdk85

  • Jan 29th, 2008
 

Using this ".htaccess" file, we can control "php.ini" and "httpd.conf" file.

For php.ini:

for register globals, Enter "php_flag register_globals on" in that file and place it inside the context folder where you are running the php files. Now this is set to globals throughout the files present inside that context folder. This is boolean, so we are giving like "php_flag". if it is the value, we have to give like "php_value"

For example : [php_value sendmail_from "dineshsdk85@gmail.com"], we have to give like this for the values.

  Was this answer useful?  Yes

.htaccess files are configuration files of Apache Server which provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.

the_bond

  • Mar 18th, 2009
 

Added to all answers , its also useful for 301 redirection, blocking your website for few users, can include .php codes on .html file. Still lot more uses are there.

This will allow to have your .php file on .html file

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html

This can block the site for few users.

AuthName "control panel"
AuthType Basic
AuthUserFile /usr/local/bham/.htpasswd

Satisfy any
<LIMIT GET>
order deny,allow
deny from all
allow from <IP Address>

require user support
require user <site login username)
</LIMIT>

tirumurugan

  • Jun 19th, 2009
 

htaccess (hypertextaccess) is the default name of a directory-level configuration file that allows for decentralized management of web server configuration. The .htaccess file is placed inside the web tree, and is able to override a subset of the server's global configuration;

abc

  • Sep 12th, 2011
 

Using this ".htaccess" file, we can control "php.ini" and "httpd.conf" file.

For php.ini:

for register globals, Enter "php_flag register_globals on" in that file and place it inside the context folder where you are running the php files. Now this is set to globals throughout the files present inside that context folder. This is boolean, so we are giving like "php_flag". if it is the value, we have to give like "php_value"

For example : [php_value sendmail_from "dineshsdk85@gmail.com"], we have to give like this for the values.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions