htaccess rewrite rule
-
My WordPress URL and Blog address URL are set in General Settings as
https://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
https://ccgi.jtonline.plus.com/blog
automatically redirects to
https://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 https://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
- The topic ‘htaccess rewrite rule’ is closed to new replies.