How do I enable the mod_rewrite Apache module for Ubuntu 11.04?

97,645

Did you ensure the RewriteEngine is on?

You'll want to verify that the mod is enabled - just look for rewrite.load symlink in /etc/apache2/mods-enabled. If not, run sudo a2enmod rewrite to enable it. Restart apache using sudo service apache2 restart and provided your .htaccess syntax is correct this will work.

Otherwise you will need to paste more information about your .htaccess file.

Share:
97,645

Related videos on Youtube

jevon
Author by

jevon

Software developer and cat.

Updated on September 18, 2022

Comments

  • jevon
    jevon almost 2 years

    In other linux like CentOS, it works but i am not getting it running in Ubuntu 11.04.

    /var/www/html/folder/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
    
  • Matt
    Matt about 3 years
    Does sudo a2enmod rewrite have to be executed from a particular directory? I.e. do I need to cd to anywhere first?
  • Matt
    Matt about 3 years
    sudo: a2enmod: command not found