mercredi 29 avril 2015

.htcaccess in Apache not working

I enabled mod_rewrite and want to redirect one of my local virtual host websites to google.com for practice.

I created an .htcaccess file in my virtual directory (/var/www/http://ift.tt/1GA3sbW) and gave permissions to .htcaccess by adding the following code to my virtual host's (example.com) config in /sites-available/.

 <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
 </Directory>

I am now attempting to use mod_rewrite by adding code to the .htcaccess file but have had no success thus far. Is there any way to check if .htcaccess is working? If it is, how do I redirect using mod_rewrite?

Aucun commentaire:

Enregistrer un commentaire