WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a .htaccess file

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

the config for the vhost looks like

<VirtualHost *:80>
    ServerName elements
    DocumentRoot /works/web/elements
    <Directory /works/web/elements>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from

But I am still getting 404 when I view pages, why is that?

share|improve this question
Is mod_rewrite enabled? What errors are you seeing in your logs? – anu May 9 '11 at 14:42
Are you getting a 404 through WordPress, or one generated by Apache? – TheDeadMedic May 9 '11 at 15:45
@TheDeadMedic, Apache – Jiew Meng May 10 '11 at 13:51
@anu, ah ... I was thinking AllowOverride All enabled mod_rewrite, but I was wrong... I needed to enable mod_rewrite ... I used a2enmod rewrite – Jiew Meng May 10 '11 at 14:04
up vote 1 down vote accepted

The problem was not having mod_rewrite enabled ...

Resolved it through

sudo a2enmod rewrite
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.