tylerdees
By:
tylerdees

a2enmod rewrite enabled makes gives me an error

November 25, 2016 81 views
Apache MySQL PHP Debian

Just gives me this error when I enable rewrite.
138.197.4.205 IP

2 comments
1 Answer

This is in the error logs : `Fri Nov 25 14:31:04 2016] [alert] [client 24.177.243.68] /var/www/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

  • Did you restarted Apache after enabling?
    When you tried to enabled rewrite, did you used sudo if you use non-root user?

    • sudo a2enmod rewrite

    This is correct output of command:

    Correct output - a2enmod rewrite
    Enabling module rewrite. To activate the new configuration, you need to run: service apache2 restart

    As it said, it requires Apache to be restarted:

    • sudo service apache2 restart

    If you have some other output for a2enmod please post it here.

    This message usually shows if you don't have rewrite enabled.

Have another answer? Share your knowledge.