.httaccess file is same as the apache httpd.conf but if you made any changes in httpd.conf it will reflects on every project on apache, if you want to use only for specific websites use .htaccess file in that particular website root folder.
Here is the Steps to Activate .htaccess file on Ubuntu 14.04 :
First Step
Open file as
Open file as
sudo vim /etc/apache2/apache2.conf
Second Step
remove comment sign (#) if you find it before this line ( line number 187 approx.)
remove comment sign (#) if you find it before this line ( line number 187 approx.)
AccessFileName .htaccess
Third Step
Then find the line where there is
replace "None" with "All"
Then find the line where there is
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride
None
Require all granted
</Directory>
replace "None" with "All"
AllowOverride All
Fourth Step :
add .htaccess file to root folder of your Website
in my case ---> /var/www/CDRTool/ folder
Last Step :
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
Thank you for this article. It helped me out.
ReplyDeleteDavid