Jump to content


- - - - -

How to Enable mod_rewrite and .htaccess on Ubuntu and Debian

Ubuntu 12.04 Debian 6

  • Please log in to reply
No replies to this topic

#1 Wilson18



  • root
  • 112 posts
  • LocationUniversity of Birmingham

Posted 25 May 2014 - 12:03 PM

In this guide, I will be showing you how you can enable the use of .htaccess files aswell as use mod_rewrite. I will be doing this through an OpenSSH connection and this can be done on both ubuntu and debian if entered in to the terminal. To enable Mod_Rewrite you must run the following command:

a2enmod rewrite

Next, to set this so that wordpress can actually use this, we must enable .htaccess for our websites. We do this by editing the Apache config file again. You must enter this at the top below the ‘NameVirtualHost *:80

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

Save the file, exit and restart

service apache2 restart

List what you read?

Check me out on: YouTube, Twitter, Facebook, Google+

Also tagged with one or more of these keywords: Ubuntu 12.04, Debian 6