Forums

[resolved] No mod_rewrite rules work; /index.php/foo does (4 posts)

  1. bussemac
    Member
    Posted 8 months ago #

    I've tried everything I can think of to debug the mod_rewrite rules. It is enable according to phpinfo(), but no matter what I put the structure as, permalinks don't work (for pages or posts).

    My .htaccess is created correctly and reads (my site is running from a folder which I have changed to /foo here)

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

    # END WordPress

    If I change the permalink structure in the WP admin menu to /index.php/whatever , it works correctly.

    My site config from sites-available:

    <VirtualHost XXXXX:80>
    <IfModule mod_rewrite.c>
    RewriteLog /var/log/apache2/rewrite.log
    RewriteLogLevel 3
    </IfModule>
    DocumentRoot /var/www/foo
    <Directory />
    Options FollowSymLinks
    AllowOverride All
    </Directory>
    <Directory /var/www/foo>
    Options FollowSymLinks
    AllowOverride All
    </Directory>
    </VirtualHost>

    The logging doesn't work either FWIW. Server is ubuntu 10.04

  2. bussemac
    Member
    Posted 8 months ago #

    I should mention that "doesn't work" means it produces a 404. Files and directories that physically exist are served correctly.

  3. bussemac
    Member
    Posted 8 months ago #

    I looked around and it seems like, based on steps in this thread: http://wordpress.org/support/topic/pretty-permalinks-problem-not-found?replies=15 that my .htaccess just isn't being read at all.

    I deliberately put a syntax error into that file and restarted apache... I can still load the site and get the server 404... so it seems like that's the problem. But I can't find any instances of AllowOverride None that would apply (I commented every one I could find out and still no change).

  4. bussemac
    Member
    Posted 8 months ago #

    Server admin looked into it and changed something, not sure what. Works now. I believe the problem was due to running in a subdirectory instead of subdomain.

Reply

You must log in to post.

About this Topic