How to enable Apache mod rewrite

If you are having problem with .htaccess file that doesn't seems to work on apache web server, you might want to enable the mod rewrite ... thumbnail 1 summary

If you are having problem with .htaccess file that doesn't seems to work on apache web server, you might want to enable the mod rewrite first, in this article i will show you how to enable mod rewrite for apache web server on lubuntu.

FYI, if you are not enabling the mod rewrite on apache web server there is no way the .htaccess file will works no matter how hard you try, so enabling the mod rewrite is a very good idea if you needed the .htaccess to work.

To enable mod rewrite is very easy to do, there is a command for that purpose, on lubuntu/ubuntu we can use the a2enmod command, alright let's try it, open terminal/ console/ command line and then run the following command:

sudo a2enmod rewrite

After that, you will need to restart the apache web server in order for the changes to take effects. Simply run this command to restart apache web server:

sudo service apache2 restart

That's it, now the .htaccess file should be working.

Không có nhận xét nào

Đăng nhận xét