301 redirection wordpress funtion

by itxel
2 replies
Hello.

Im new here so I will try to explain myself the best I can.

Time a go I change the permalinks on my wordpress blog and I got this on my .htaccess for make redirection and avoid to lost traffic

RedirectMatch 301 ^/([^/]+)/([^/]+).html$ http://www.mysite.com/$2

Now, I want to change the permalinks from /%year%/%monthnum%/%postname%.html to
/video/%postname%.html My site is not installed on the sub folder. Is ben install on the main root. I know how to change that permalinks from wordpress settings, but I can not find a way to do a propper 301 redirection for my old posts (around 43900 posts)

Anyone know if is possible made that and how, please?

Im not that good with php

Regards
#301 #funtion #redirection #wordpress
  • Profile picture of the author rhinocl
    Normally Wordpress changes the .htaccess for you when you change your permalink method.

    I would download a copy of the present .htaccess first just to be safe (make sure the encoding doesn't get changed when you open it)

    Then just update your permalinks (copy the old setting down just in case).

    Chances are everything will work fine without additional work.
    {{ DiscussionBoard.errors[9494853].message }}
    • Profile picture of the author itxel
      Thanks for you replay but when I done I see this on any post page when I try to access:

      Warning: require(/home/-------/public_html/video/wp-includes/load.php) [function.require]: failed to open stream: No such file or directory in /home/-------/public_html/video/wp-settings.php on line 21

      Fatal error: require() [function.require]: Failed opening required '/home/-------/public_html/video/wp-includes/load.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/-------/public_html/video/wp-settings.php on line 21

      {{ DiscussionBoard.errors[9494886].message }}

Trending Topics