Wildcard Redirect Help! Wordpress not working!

by SeanyG
2 replies
Hey guys,

I just spent an hour on the phone with Hostgator while Googling looking for answers with no luck.

I moved my wordpress blog from: http://www.oldsite.com to http://www.newsite.com

The old site has a lot of links coming into it so I copied over all of the content to newsite.com in the same post / page URLs with the same post / page names.

If someone goes to http://www.oldsite.com/welcome/ for example, I would like them to be redirected to http://www.newsite.com/welcome/.

Sounds simple right? Just add a wildcard redirect in my Hostgator cpanel right?

It doesn't work! The index page redirected fine but no other page would. It just stayed on http://www.oldsite.com/welcome/.

An exact match url - http://www.oldsite.com/welcome.html will redirect to http://newsite.com/welcome.html but /welcome/ won't redirect. All wordpress posts have the /post/ structure...

The friendly Hostgator man said that wildcard redirects only work for redirecting visitors from exact file to exact file and Wordpress has a different structure. http://oldsite.com/welcome/ isn't a file so a wildcard redirect won't work.

So how can I make each page on my old site redirect to the new site without having to do it manually? There are hundreds of pages.

Is there some code that I can add to the httaccess file? If so can you paste it in here?

Thanks so much!

~Sean
#redirect #wildcard #wordpress #working
  • Profile picture of the author N4PGW
    I don't know if this is the answer. You may have embedded links. I used WPTwin to backup my site, LiveOffTheWeb.com from /blog to the root folder. I had to correct some links, but the site moved. As for 302 redirect, I did not use it so you get my 404 error I think I have a plugin that finds similar titled documents and brings them up.

    I just tested it to see and what happens is if you enter LiveOffTheWeb.com/blog, you get an article that starts with 'blog', but if you enter LiveOffTheWeb.com/asdfasdf, you get a 404 error.
    Signature

    {{ DiscussionBoard.errors[4490304].message }}
    • Profile picture of the author SeanyG
      Found it. Just needed to add this to the httaccess file:

      "RedirectMatch 301 /(.*)? http://inspiremyinbox.com/$1"
      Signature
      FREE Video DJ Lessons to help you learn
      >>>How To DJ
      {{ DiscussionBoard.errors[4493233].message }}

Trending Topics