: Redirect directory URL to instead have .html suffix htaccess redirect (301) all my old content from my WordPress to my new URL design. I want to redirect all the last trailing slashes to .html
htaccess redirect (301) all my old content from my WordPress to my new URL design. I want to redirect all the last trailing slashes to .html ... the permalinks are already working, but I don't want to lose all my collected backlinks for which I worked so hard.
This is how my URLs look like:
Pages (old): /pages/redirection/ should redirect to /pages/redirection.html
Posts (old): /new-permalink/ should redirect to /news/new-permalink.html
Custom Posts /permalink/ should redirect to /projects/permalink.html
The following rewrite rule does not work for me. It ignores my rewritebase, so it redirects /projects/permalink/ to /permalink.html not to /projects/permalink.html.
RewriteEngine On
Options +FollowSymLinks
RewriteBase /project/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /project/index.php [L]
RewriteRule /project/([^/]*)/?$ /project/.html [L]
More posts by @Frith620
1 Comments
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.