0

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]
</IfModule>

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 127.0.0.1
    </Directory>
</VirtualHost>

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

4
  • 1
    Is mod_rewrite enabled? What errors are you seeing in your logs?
    – anu
    Commented May 9, 2011 at 14:42
  • 1
    Are you getting a 404 through WordPress, or one generated by Apache? Commented May 9, 2011 at 15:45
  • @TheDeadMedic, Apache
    – Jiew Meng
    Commented May 10, 2011 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
    Commented May 10, 2011 at 14:04

1 Answer 1

1

The problem was not having mod_rewrite enabled ...

Resolved it through

sudo a2enmod rewrite

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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