• Hi all,

    I am currently building a website locally using XAMPP. Everything on the site is working apart from when displaying blog posts. The website is not a blog, rather it is a website which has a blog page.

    My current permalink settings are:
    Custom Structure: https://localhost/mywebsite/%category%/%pagename%

    The blog posts will not display with the url:
    https://localhost/mywebsite/blog/post-title
    I get the 404 Page Not Found.

    Nor are any of the posts shown when i click on the link for my main blog page, url:
    https://localhost/mywebsite/blog
    I get no content on the page apart from the main page title, Blog.

    However the blog posts will show when you click on the month/year links in the Archive widget on the side sidebar. They will appear one after the other down the page (latest at the top). An url with the form:
    https://localhost/mywebsite/2015/09
    But as soon as you click on the post title to navigate to the page of the post, I receive the Page Not Found 404 as before.

    I have been through the usual XAMPP procedure scattered around the internet:
    1. Remove hashtag from: LoadModule rewrite_module modules/mod_rewrite.so
    2. AllowOverride All

    These have not made a difference though. Can anyone help or identify where the issue lies?

    Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    In order to address page not found issue, make sure & cross check htaccess file whether being created in root folder or not.

    If it is missing, then add the file manually with following code:

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

    Also after enabling :
    LoadModule rewrite_module modules/mod_rewrite.so
    in Apache configuration file Apache restart should be done.

    Please try the above colution & hope your issue would be addressed.

    Thanks.

    Thread Starter @mcuk

    (@mcuk)

    Hi @aksdvp thanks for your reply.

    I do have the htaccess file, currently in the location:
    C:\xampp\htdocs\mywebsite

    The code in that file reads:

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

    I have tried replacing the code above with yours (i.e. removing the mywebsite parts, then doing restart) but that doesn’t work. It creates more issues making the rest of the website inaccessible and showing Welcome to XAMPP pages…

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘404 error with blog posts on localhost XAMPP site’ is closed to new replies.