Need htaccess redirection code for permalink change

by 3 replies
4
I have changed my permalink structure from /%postname%/ to /%postname.html.

Now I need a htaccess code to redirect old structure post to new structure one.

Found a code but it says you have to write for each and every page, more than hundred pages are there.

Is there any code to redirect all posts with old structure to new one ? 301
#programming #change #code #htaccess #permalink #redirection
  • There is a redirect plugin that can do as it is hard for ranking SERP. There is no such thing that we can make all the links once at a time.
  • Here is the WP Plugin that will do this job...

    https://wordpress.org/plugins/esb-url-extension/
  • One of the first things to do when you login to your newly installed WordPress dashboard is to adjust the permalink settings to set the url structure for the site. You can do this by going to the Settings → Permalinks panel.
    The default permalink setting for WordPress create ugly urls p=123 using the postid number. Changing to one of the date structures isn’t much better. The best option from an SEO perspective is to choose postname to put the title of your post in the url or, what some do, select Custom Structure and put /%category%/%postname%/ to add the category as well as the post title in the url. Then you want to use keywords for category names.

Next Topics on Trending Feed