title: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
body: <p>So I have this .htaccess which rewrites a URL for me, it hasn't been working.</p>
  
  <p>If I check <code>var/logs/apache2/error_log</code>, it says :-</p>
  
  <pre><code>[[Sun Jul 16 18:22:28.958099 2017] [core:alert] [pid 4237] [client ::1:54344] /Library/WebServer/Documents/getcv/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
  </code></pre>
  
  <p>What might be wrong? I even have <code>rewrite_module</code> enabled in httpd.conf</p>
  
  <pre><code>LoadModule request_module libexec/apache2/mod_request.so
  LoadModule include_module libexec/apache2/mod_include.so
  LoadModule rewrite_module modules/mod_rewrite.so
  LoadModule filter_module libexec/apache2/mod_filter.so
  </code></pre>
  
  <p>Here's the <strong>.htaccess</strong></p>
  
  <pre><code>Options +FollowSymLinks
  RewriteEngine On
  RewriteBase /foldername/
  
  RewriteCond %{THE_REQUEST} /my_profile\.php\?username=([^\s&amp;]+) [NC]
  RewriteRule ^ %1? [R=301,L,NE]
  
  RewriteCond %{SCRIPT_FILENAME} !-d
  RewriteCond %{SCRIPT_FILENAME} !-f
  RewriteRule ^([\w-]+)/?$ my_profile.php?username=$1 [L,QSA]
  </code></pre>