Linux : .htaccess redirect not working in Apache
Once you have installed Apache and PHP in your server and the .htaccess redirect is not working properly It was due to the Apache configuration.
Before that, we have to ensure that the rewrite_module has configured with Apache server.
Open httpd.conf file and update following changes, if you could not found configure file just give command "whereis" ,
By default your DOCUMENT_ROOT /var/www/html
" AllowOverride None" change to " AllowOverride All "
Options ExecCGI FollowSymLinks IncludesNOEXEC SymLinksIfOwnerMatch
# AllowOverride None
Require all granted
Also you need to sure that if mod_rewrite module is activated by executing phpinfo();
For example to check the redirection create a .htaccess file under DocumentRoot directory and add below and check it.
RewriteRule ^(.*)$ http://www.thelinuxfaq.com [L]