[wp-testers] URL rewrite error

Jeremy Visser jeremy.visser at gmail.com
Sat Oct 27 07:13:22 GMT 2007


On 10/27/07, Zhao Qianli <zhao.qianli at gmail.com> wrote:
> I test Wordpress 2.3.1 on my localhost, but 404 error appears when clicking
> a post link. My localhost is based on Ubuntu 7.10 with apache 2、PHP5 and
> MySQL 5, and I have enabled mod_rewrite. The default permalink format is ok
> ,but other formats (eg. /%year%/%monthnum%/%day%/%postname%/ ) don't work.
> Please help me ! Thanks.

This is because Ubuntu does not allow .htaccess files by default.

Open up /etc/apache2/sites-enabled/000-default, and find the line:

    <Directory /var/www>

Then, where it says:

    AllowOverride None

change it to:

    AllowOverride All

and do:

    sudo invoke-rc.d apache2 restart

If you're not unlucky, it should work! :)


More information about the wp-testers mailing list