0

I have an existing website with pages like:

http://www.website.come/page1.htm
http://www.website.come/page2.htm
http://www.website.come/page3.htm

etc.

And I have redesigned my website in WordPress that has links like:

http://www.website.come/page1/
http://www.website.come/page2/
http://www.website.come/page3/

but I need old links because they are posted on various websites and I don't want to redirect those links.

So, when someone clicks on:

http://www.website.come/page1.htm

without redirection, it should show the content of:

http://www.website.come/page1/

and so on...

So, I want that when anyone opens an old link like

http://www.website.come/page1.htm

in my new WordPress based website, I want the user to neither redirect nor show 404 error. Instead, I want that URL to stay as it is but show the content of the page

http://www.website.come/page1/

3 Answers 3

1

Sorry for incomplete answer, Use the 301 redirects. This link give an idea about redirects https://moz.com/learn/seo/redirection

https://wordpress.org/plugins/simple-301-redirects/

For the wordpres there are free good plugins for add html / htm extension to urls.

This for - ".html" https://wordpress.org/plugins/html-in-url/

I think you can edit it and change it to ".htm"

If you dont want to use plugins,follow this and change it according to your requirement,

http://carlofontanos.com/add-html-extension-to-permalinks/

1

I know this isn't what you've asked for but you'd be better IMO to 301 redirect these old links.

If you have access to the .htaccess file (in the root of your site) then you can use the following code

RedirectMatch 301 page1.htm http://www.website.com/page1/
RedirectMatch 301 page2.htm http://www.website.com/page2/
RedirectMatch 301 page3.htm http://www.website.com/page3/

Place this above the code added by WordPress

A 301 Redirect tells search engines that the resource has permanently moved, any existing Page Rank your page currently has on Google for example will move across with it. They also redirect any visitor who hits the old URL to the new one.

Failing that you can install a plugin to do this such as Simple 301 Redirects.

However if you insist on having the .htm extension then I think you can change the rewrite rule WordPress created in your .htaccess file (untested)

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*) $1.htm [nc]
0

https://github.com/WPPress/WPUrlMapper

This could be what you are looking for.

Provides custom meta box to enter old url which would be mapped to new url without redirection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.