301 Redirect Help Needed

by 5 replies
6
I have moved 40k html articles into wordpress, I now need to setup 301 redirects so I don't lose all my link juice.

the old format was

/articles/My_Old_Title.html
/articles/Slightly_Longer_and_Crazier_Title.html

the new format is

/articles1/my-old-format/
/articles1/slightly-longer-and-crazier-title/

can anybody help me out with the syntax on my 301 statements (so I don't have to have 40,000 of them)
#programming #301 #needed #redirect
  • The problem is you don't know how many words will be in a title to do an easy regex match in .htaccess.

    What you could do is to intercept every file request to the directory "articles" and rewrite it in a small script which redirects to the new name.
  • Ok, try my htaccess ..

    Options +FollowSymlinks
    RewriteEngine on

    Redirect /articles/My_Old_Title.html h|ttp://do|main.|co|m/articles1/my-old-format/[/url]
    Redirect /arti|cles/|Slightly_Longer_and_Crazie|r_Title.html ht|tp://do|main.com/articles1/slightly-longer-and-crazier-title/

    Please Remove the " | " in http and the domain.com
  • I think it would be much more easier if you install permalaink redirec plugin. In the phugin give structure of your old html urls. All the old urls will be 301ned to new structure.
  • You can install permalink redirect plugin. It is easily available.All you have to do is submit your old URLs and your old URLs will be easily converted to the new structure.
    • [1] reply
    • yeah i just typed in 'meta redirect' and got a good plugin that way.
  • Banned
    [DELETED]

Next Topics on Trending Feed