mod_rewrite is responsible for the redirection and this must be uncommented in httpd.conf file.
LoadModule rewrite_module modules/mod_rewrite.so