This error probably has a fairly simple solution, but I have been looking for it for a long time and still do not get the error. I think I tried everything I could.
Problem: when I include fairly permalinks to my Wordpress installation (so that it uses /% postname% /), it does not work. I get 404 on all pages except the main page.
This http://codex.wordpress.org/Permalinks page tells me that the permalink requirements will work:
- Apache web server with mod_rewrite installed.
- In the WordPress home directory,
- FollowSymLinks option enabled
- FileInfo directives allowed (e.g. AllowOverride FileInfo or AllowOverride All)
- .Htaccess file (if this file is missing, WordPress will try to create it when you activate the "pretty" permalinks)
- If you want WordPress to automatically update the .htaccess file, WordPress will have to write access to the file.
An Apache web server is installed, the mod_rewrite module was loaded with the a2enmod rewrite command (and the server was restarted several times after). Thus, in / etc / apache 2 / mods-enabled there is a symbolic link for rewrite.load. In addition, when I run the phpinfo command, I see that the mod_rewrite module is loaded. You can also check it out here: http://namorti.com/phpinfo.php
Then in / etc / apache 2 / sites-enabled there was no "default" presence. I copied 000-default.conf by default and subsequently changed the default value. It contains the following: DocumentRoot / var / www
<Directory /> Options FollowSymLinks Indexes AllowOverride FileInfo </Directory>
So, as far as I can tell, FollowSymLinks is enabled, and FileInfo directives are enabled.
As for the last two points, in my home wordpress directory (/var/www),.htaccess is present and written Wordpress (I updated the permalink structure several times and updated the .htaccess file accordingly). Now it contains the following:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
So, as far as I know, this MUST work. I restarted the server (service apache2 restart) several times. I do not see what I am missing. Who has a key?
Thanks in advance!
* EDIT *
So, I did what calcinai told me ... I edited the file / etc / apache 2 / sites-enabled / default (containing vhost). Now it looks like this:
<VirtualHost *:80>
I restarted apache again, but unfortunately it still doesn't work. Honestly, this would surprise me, because moving directives from the .htaccess file to vhost would work if htaccess would work on it, since everything else seemed to me quite correct ...
Any other suggestions? Thanks for this!