WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks Not Working - 404 Error (9 posts)

  1. illmatic
    Member
    Posted 1 year ago #

    Hey guys,
    not sure if this is the best place to post but I am working on a localhost so I figured.

    I am running Server2Go as a portable server and working on my new website.

    I chose the /%postname%/ setting for my permalinks, however links to pages or blog posts display a 404 error. The default setting seems to be the only one that works.

    Before you suggest, I have already enabled rewrite module and changed AllowOverride to all.

    I did get the same permalink settings to work fine in my last site I made through server2go, I was running the previous version of WordPress, if that helps. The htaccess file is the same as my old website as well, so I'm not sure what the problem is

  2. but I am working on a localhost so I figured.

    You figured correctly. ;)

    Before you suggest, I have already enabled rewrite module and changed AllowOverride to all.

    What's your .htaccess look like? If it's not too long can you post it here using the code button?

    I have a feeling that mod_rewrite is not enabled properly. The .htaccess is wrapped in <IfModule mod_rewrite.c> so even if it's not activated it will not toss an error.

  3. illmatic
    Member
    Posted 1 year ago #

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /larkztheme/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /larkztheme/index.php [L]
    </IfModule>
    
    # END WordPress
  4. Just for giggles, make a backup copy of that .htaccess file and delete these two lines.

    <IfModule mod_rewrite.c>
    
    </IfModule>

    And visit your localhost installation at /larkztheme/ (it is located in /larkztheme/ right?)

    If the module is installed properly then it should just work. If you get an error from the localhost webserver from removing those lines then mod_rewrite needs to be checked.

    Either way, once done put that copy back. ;)

    Also when you added AllowOveride All where did you put that? In the <Directory /> section?

  5. illmatic
    Member
    Posted 1 year ago #

    Yeah still 404 after removing those two lines.
    I enabled mod rewrite and AllowOverride All in the server2go 'httpd' CONF file.
    I used the exact same file on another website running the previous version of wordpress and everything was fine.

  6. Yeah still 404 after removing those two lines.

    Yep, mod_rewrite is fine then.

    Your httpd.conf file then maybe? Can you paste that into pastebin.com and provide the link to that paste?

    That file will probably be too long for here and pastebin.com provides line numbers as well.

  7. illmatic
    Member
    Posted 1 year ago #

  8. Line numbers are our friends and should be used. ;)

    Look at line 178 of your httpd.conf file. The AllowOverride None needs to be changed to AllowOverride All.

    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Satisfy all
    </Directory>

    Try that and bounce your localhost web server. See if that does it.

  9. illmatic
    Member
    Posted 1 year ago #

    It doesn't do it :(

Topic Closed

This topic has been closed to new replies.

About this Topic