Enabling and Disabling the Apache Rewrite Module (mod_rewrite) in Linux (Ubuntu)

Enabling the Rewrite Module

Run the command followed by the module name:

sudo a2enmod rewrite

Restart Apache for the changes to take effect:

sudo service apache2 restart

Disabling the Rewrite Module

Run the command followed by the module name:

sudo a2dismod rewrite

Restart Apache for the changes to take effect:

sudo service apache2 restart

That’s it!

Advertisements

2 thoughts on “Enabling and Disabling the Apache Rewrite Module (mod_rewrite) in Linux (Ubuntu)

  1. No matter what I tried, my .htaccess file wasn’t doing anything. Then I stumbled across this blog post. All is well now! Thanks a bunch!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s