title: Wordpress: Page not found - Permalink postname
body: <p>This is a frequently asked question, but after searching for hours I couldn't find any solution that worked for me. So, here's my problem:</p>
  
  <p>When I change my permalinks setting to 'postname' I get a 404 Error when I navigate to a page. I works with the default setting and when I put <code>index.php</code> before 'postname' (like this: <code>http://localhost/wordpress/index.php/%postname%</code>). But this is pretty ugly and bad for SEO.</p>
  
  <p>My local wordpress installation is here: <code>/var/www/html/wordpress/</code>, so I can reach the wordpress homepage at <code>http://localhost/wordpress/index.php</code></p>
  
  <p>I'm running Debian Jessie and WordPress 4.5.3</p>
  
  <p>This is my htacces file automatically created by Wordpress (<code>/var/www/html/wordpress/.htaccess</code>). Permission are set to 664.</p>
  
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /wordpress/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /wordpress/index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  
  <p>The Apache Rewrite module is enabled (<code>sudo a2enmod rewrite</code>)</p>