More .htaccess Trouble
-
Last week I got some help on this forum, allowing successful redirects from
domain.com/year/month/post-name/
to
domain.com/blog/year/month/post-name/I thought that solved my problem. But now I’ve learned that external links with .html extension result in 404’s.
domain.com//year/month/post-name.html → 404, NOT FOUND.So is there a way to make sure that all three URL variants are redirected properly? Specifically…
domain.com/year/month/post-name/
domain.com/blog/year/month/post-name/
domain.com/year/month/post-name.HTML
…should redirect to…
domain.com/blog/year/month/postname.htmlMy current .htaccess:
# 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
And yes, I’ve tried resetting permalinks to default and back. That trick worked for last week’s problem, but it’s not working for this.
- The topic ‘More .htaccess Trouble’ is closed to new replies.