venerdì 14 settembre 2012

Enable htaccess Apache in Ubuntu


Enable htacces for directories

we know that htaccess permission must on apache web server like making SEF urls, directory permissions..etc.here we discuss about how to check .htaccess enabled.
Before we begin this tutorial, please make sure you make a backup copy of the originalhttpd.conf apache configuration file located in apache installation folder in case we make a mistake, this way we can always go back to the original configuration file
Now open
httpd.conf
file with note pad and find the below text
<directory />
    Options FollowSymLinks
    AllowOverride none
    Order deny,allow
    Deny from all
    Satisfy all
</directory>
Then replace AllowOverride none to AllowOverride All. Modified version looks as below
<directory />
    Options FollowSymLinks
    AllowOverride all
    Order deny,allow
    Deny from all
    Satisfy all
</directory>
Above change tells the apache to use .htaccess as per directory bases.
Now we can use .htaccess files .

Remember

Remember while uploading .htaccess file to remote server make sure the file transfer in ASCII mode, generally with windows operating system FTP programs use binary mode.
Generally FTP programs doesn’t display the .htaccess files by default ,we must force the FTP program to show hidden files like .htaccess files.
When you save .htaccess file with note pad it saves as .htaccess.txt .Make sure .htaccess is a file extension not a file name with empty name.