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.

# httpd -M

core_module (static)
authn_file_module (static)
authn_default_module (static)
rewrite_module (shared)

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 "
# vim /etc/httpd/conf/httpd.conf

<Directory "/var/www/html">
Options ExecCGI FollowSymLinks IncludesNOEXEC SymLinksIfOwnerMatch
   # AllowOverride None

   AllowOverride All
    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.

RewriteEngine on
RewriteRule ^(.*)$ http://www.thelinuxfaq.com [L]