• Resolved jtonline

    (@jtonline)


    My WordPress URL and Blog address URL are set in General Settings as
    http://ccgi.jtonline.plus.com/blog (Note, no trailing slash).

    I have just noticed that the link to the site index at the top of the RSS feed points to this address, and because there is no trailing slash, WordPress (correctly) tries to locate a blog entry title containing the word ‘Blog’ and generates a Page not found error.

    I would like to alter my .htaccess file so that http://ccgi.jtonline.plus.com/blog automatically redirects to
    http://ccgi.jtonline.plus.com/blog/ which will correct the RSS feed and prevent some other potential issues, without it stopping the rest of the site from working as it currently does.

    I was going to add redirect /blog http://ccgi.jtonline.plus.com/blog/ to the file, but having looked at it, perhaps I just need to modify one of the existing Rewrite rules a bit?

    Current .htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    # END WordPress
Viewing 1 replies (of 1 total)
  • Thread Starter jtonline

    (@jtonline)

    Someone at the community support forums of my ISP has resolved the issue for me. I had to delete the .htaccess file that WordPress created in the /blog directory and create a new file in the root folder as follows:

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+[^/])$ $1/ [R,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
Viewing 1 replies (of 1 total)
  • The topic ‘htaccess rewrite rule’ is closed to new replies.