Wordpress: Page not found - Permalink postname

admin

Administrator
Staff member
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:

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
before 'postname' (like this:
Code:
http://localhost/wordpress/index.php/%postname%
). But this is pretty ugly and bad for SEO.

My local wordpress installation is here:
Code:
/var/www/html/wordpress/
, so I can reach the wordpress homepage at
Code:
http://localhost/wordpress/index.php

I'm running Debian Jessie and WordPress 4.5.3

This is my htacces file automatically created by Wordpress (
Code:
/var/www/html/wordpress/.htaccess
). Permission are set to 664.

Code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>

# END WordPress

The Apache Rewrite module is enabled (
Code:
sudo a2enmod rewrite
)