The website developers generally use mod_rewrite to improve user-friendliness and search engine friendliness of websites by exposing more memorable and crawlable URLs to the users.By default in CentOS or in RHEL flavors of Linux has Apache 2.2 installed. It often becomes a requirement to mod_rewrite enable on these servers. Techs who have been working with cPanel and server with control panels often finds it difficult to troubleshoot issues with a bare server. There are a few things to check or commands to execute in such case where mod_rewrite is shown enabled in the httpd.conf, but not working.
[root@cave html]# httpd -V
Server version: Apache/2.2.3
[root@cave html]# httpd -M
Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
auth_basic_module (shared)
auth_digest_module (shared)
….
…….
….
rewrite_module (shared)
proxy_module (shared)
proxy_balancer_module (shared)
proxy_ftp_module (shared)
proxy_http_module (shared)
proxy_connect_module (shared)
[root@cave html]# a2enmod rewrite
a2enmod is only to be used if the rewrite_module is not enabled in httpd.conf
Check for the “AllowOverride” settings. It should be set to “All“. By default it will be “None”
Things should work fine after this. Also, I found a small good script to check at this URL to see whether mod_rewrite is enabled or not http://www.webune.com/forums/how-to-test-check-if-mod-rewrite-is-enabled-t40.html
Good Luck guys! Try it out and put your feedbacks in the comment box ð