WordPress.org

Ready to get started?Download WordPress

Forums

redirect old SMF forum on old domain to new WP blog on new domain (8 posts)

  1. dotch
    Member
    Posted 2 years ago #

    Hi,

    I've closed my old SMF forum which was on a shared hosting account.
    I've setup a new WP blog on my Apache/CentOS/Plesk VPS

    I've copied part of the forum postings to blog articles (using a WP bbcode plugin). I've also copied the URLs of the old forum postings. I used the SMF "Pretty Urls mod", so the URLs of the SMF forum were readable and seo friendly.

    I've created a domain in plesk for my old forum and pointed the old domain name to my domain in plesk on my VPS. I also created the folder "smf" with only a .htaccess file. I also put the .htaccess file in the root. For the rest the domain is empty.

    I use this rule:

    Redirect 301 /smf/blabla/my-seo-friendly-smf-forum-post/ http://mynewwpblog.com/?p=123

    When I type the complete old forum URL http://myoldsmfforum.com/smf/blabla/my-seo-friendly-smf-forum-post/ in Firefox, I get this message:

    "Not Found

    The requested URL /smf/blabla/my-seo-friendly-smf-forum-post/ was not found on this server.
    Apache/2.2.3 (CentOS) Server at mynewwpblog.com Port 80"

    My server is reached, but it seems to look for the old forum URL rather than the new WP URL?

    Thanks for any help!

  2. Delete the smf folder and put those .htaccess rules in the one you have one folder up :)

    Or change the rules in the SMF folder to this:

    Redirect 301 /blabla/my-seo-friendly-smf-forum-post/ http://mynewwpblog.com/?p=123
  3. dotch
    Member
    Posted 2 years ago #

    Thanks for the reply. I found out that my old smf postings have "www" URLs. So the complete old forum URL is http://www.myoldsmfforum.com/smf/blabla/my-seo-friendly-smf-forum-post/

    If I delete the "www" in Firefox adress bar, the redirect works fine. Problem is that my old URL's DO HAVE "www".

    I tried this code (found with google) in the .htaccess file but it does NOT work:

    Options +FollowSymlinks
    RewriteEngine On
    RewriteCond %{http_host} ^www.myoldsmfforum.com [NC]
    RewriteRule ^(.*)$ http://myoldsmfforum.com/$1 [L,R=301]

  4. Doesn't matter.

    The issue is that, in the folder SMF, you've said 'URLs starting with SMF...'

    You've double up'd :)

    I'd use this in my top level .htaccess:

    Redirect 301 ^smf/blabla/my-seo-friendly-smf-forum-post/ http://mynewwpblog.com/?p=123
  5. dotch
    Member
    Posted 2 years ago #

    Ah, I can't get it to work. To make things more complicated, Firefox seems to "remember" old or wrong redirects. When I test it in IE or Chrome, I get an Apache Testpage.

    I've removed the SMF folder, so the root of my old SMF site (httpdocs, because I use plesk, it was public-html on my shared account) is empty. I put the htaccess file in the root. With the folowing rule:

    Redirect 301 ^smf/my-cat/my-url/ http://mynewblog.com/?p=159

    or

    Redirect 301 smf/my-cat/my-url/ http://mynewblog.com/?p=159

    For now I've forwarded the old domain to my new domain from my domain manager. It was better, however to redirect individual pages, because they are popular and they contain affiliate links.

    Perhaps my VPS is not setup correctly? When I type "www." before any of my domains it redirects to 1 other website on the same IP....

    any other ideas? Thanks for all the efforts on this!

  6. So you had http://myoldsmfforum.com/smf/

    And you parked it on top of http://mynewblog.com

    So if you go to http://myoldsmfforum.com/smf/ it tries to go to http://mynewblog.com/smf, right?

    Try just this (and make sure it's ABOVE the #start wordpress section:

    Redirect 301 ^smf/(.*)$ http://mynewblog.com/
  7. dotch
    Member
    Posted 2 years ago #

    No that's not what I mean (I think).

    All my domain-names including myoldsmfforum.com and mynewblog.com are hosted by a large domain name host (registrar) now. All my websites are hosted on my own Plesk/Apache/CentOs VPS now. So I'm my own hosting company/admin and I'm my only client. I can create up to 10 user accounts (they call it clients/domains in Plesk) for me.

    I've closed my old SMF Forum/TinyPortal (which was still on an old shared hosting account). I only keep the domain-name myoldsmfforum.com to be able to redirect old SMF-URLs, which I saved in a *.txt file, to my new WP-blog. So I created a special user account in my Plesk VPS for myoldsmfforum.com only to place the .htaccess in the root. So it's an empty "website" with only an .htaccess file.

    I've done redirects a couple of years ago without problems, but I can't get it to work on my VPS. I tried this solution but no luck. I don't even think .htaccess files are disabled by default in Plesk, but I'm not 100% sure.

    I don't think I have to put anything else, but the 301 redirect rules in the .htaccess file in the root of myoldsmfforum.com, don't I? It redirects to my server but the server looks for the old SMF URLs in stead of the new WP URLs:

    "Not Found

    The requested URL /smf/blabla/my-seo-friendly-smf-forum-post/ was not found on this server.
    Apache/2.2.3 (CentOS) Server at mynewwpblog.com Port 80"

    As a work around I've forwarded the complete domain myoldsmfforum.com to mynewblog.com from my user account at my domain-name host, using the domain manager (DNS) in that account.

    I think normally a .htaccess file in the root of website/blog overrules the redirect done from a domain manager (DNS)? I mean can I redirect (asuming it works) to individual pages, when the complete domain is forwarded from the domain-host? Which goes first?

  8. dotch
    Member
    Posted 2 years ago #

    As a work around I've forwarded the complete domain myoldsmfforum.com to mynewblog.com from my user account at my domain-name host, using the domain manager (DNS) in that account.

    Aaaahhh, the work-around doesn't work either. I thought it would sent all traffic from my old SMF domain to my new blog; but it doesn't. It keeps looking for the old URLs.

    Gotta find a solution for this 'cause I loose a couple of Dollars every day and dissapointed visitors too....

Topic Closed

This topic has been closed to new replies.

About this Topic