Monday, May 12, 2008

What to do if .htaccess is not working on linux

Many of the time it happens when someone has configured LAMP machine, Even after doing everything right .httaccess do not works. Below are the tips to make it work. I have wrote the tips which I know, Will keep enhancing this as I come to know more.

Tips:
  1. Check your httpd.conf file for mod_rewrite extension. It should be uncommented.
  2. Check Override permission in http.conf file for .htaccess, If it is "None" make it "All".
  3. Always restart your webserver after every change made to httpd.conf file.
  4. Do check your .htaccess name. It should be .htaccess only.
  5. Do check the code of .htaccess. It should be correct, Otherwise your application will not run.
  6. If you are using wamp you can enable mod_rewrite module using GUI also.