How to redirect old .html links to new php files?
-
I moved my blog from TypePad to WordPress. All my TypePad posts and pages ended in .html. The URLs looked like this:
https://myblog.com/weblog/2010/09/read-this.html.Now on WordPress, which uses php, the URLs look like this:
https://myblog.com/weblog/2010/09/read-this/
The URLs end with a slash instead of .html.
I installed the plugin Broken Links, which shows all the links have broken.
How do I redirect all the .html links to the new php files which end in a slash /?
One solution I tried was to use this custom permalink structure:
/%year%/%monthnum%/%postname%.html
Then all the posts ended in .html and the broken links were fixed.
That was suggested in a post in the blog, Digital Inspiration.
But then there’s a problem with the pages.
They look like this:
https://myblog.com/weblog/about
On TypePad they kept the .html extension and looked like this:
https://myblog.com/weblog/about.html
Is there any way I can redirect all the old .html links to the new php files that end in a slash?
I downloaded the plugin Redirection but can’t figure out how to use it. And I don’t know how to edit .htaccess and mod_rewrite. What’s the code to make the changes in .htaccess and mod_rewrite? What’s the code and where do I add it to redirect .html links to the new php files?
- The topic ‘How to redirect old .html links to new php files?’ is closed to new replies.