Hi
I just tried to change the permalink in wordpress so it looks nicer and the links are more like “http://ansi.23-5.eu/2011/12/29/apache-rewrite-for-wordpress/” instead of “http://ansi.23-5.eu/?id=blubber/”. Normally this is done in 2 steps. But I had some error in my virtual host configuration file. But please let me first explain the 2 normal steps. Just for the sake of completeness.
- Inside WordPress under /Settings/Permalinks change it to some nice looking.
- As root execute “a2enmod rewrite” and a nice “/etc/init.d/apache2 restart”
Normally thats all. But it turns out that I had a mistake in my virtual host config file.
It looked like
<Directory /var/www/ansi.23-5.eu/> Options Indexes FollowSymLinks MultiViews AllowOverride none Order allow,deny allow from all </Directory>
But with this setting it disables the rewrite for this virtual server. The right config should
look like this:
<Directory /var/www/ansi.23-5.eu/> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all </Directory> With this change and a "/etc/init.d/apache2 restart" everything works fine and I have the nice permalinks.