Showing posts with label links defined in .htaccess is not working. Show all posts
Showing posts with label links defined in .htaccess is not working. Show all posts

Friday, April 19, 2013

.htaccess issue - html links are not working

.htaccess - Menu Links are not working


.htaccess links defined in rewrite-rules are not working in apache2

1) Enable rewrite module
   $ sudo a2enmod rewrite    $ service apache2 restart


2) These lines should be in /etc/apache2/apache2.conf
AccessFileName .htaccess <Directory /var/www>     AllowOverride All     #AllowOverride None </Directory> 
Restart apache2.

3) Enter following lines in /etc/apache2/httpd.conf

<Directory /var/www/project-name>     AddHandler cgi-script .cgi     Options +Indexes +ExecCGI     AllowOverride all </Directory> 

4) "AllowOverride all" should be uncommented in apache2.conf or httpd.conf.