How to enable mod_rewrite in apache2

Leave a Comment
In Previous tutorials we looked how to mod_rewrite in windows xammp today we are gonna learn how to enable mod_rewrite in apache2. Here is some command which we have to follow.

To check whether mod_rewrite is enabled:

Look in mods_enabled for a link to the module by running


ls /etc/apache2/mods-enabled | grep rewrite

If this outputs rewrite.load then the module is enabled. (Note: your path to apache2 may not be /etc/, though it's likely to be.)

To enable mod_rewrite if it's not already:

To Enable the module we have to execute below commands

a2enmod rewrite


Now restart apache2 server

service apache2 restart


After restart check phpinfo file in browser. you will get mod_rewrite module enable in apache2


Helpful links




Please comment down below if you have any query and please follows us for more awesome tutorials and keep motivating us .

0 comments:

Post a Comment

Powered by Blogger.