Change Domain

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • foxfirediego
    New Member
    • Aug 2005
    • 17
    • 3.6.x

    Change Domain

    Here is the situation:
    I have my actual website at www.abc.com and i'm going to change my domain to www.xyz.com it's easier to update the config settings and change my domain to xyz.com but my question is:
    a lot of posts has the address

    how can I manage to replace
    http://forum.abc.com/forumdisplay.php?f=1 with http://forum.xyz.com/forumdisplay.php?f=1
    when I finish changing my URL?
    I mean, is there any way that when someone access

    it's replace to

    Thanks
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Run a query like this on your database (backup first):

    Code:
    UPDATE post
    SET pagetext = REPLACE(pagetext,'[color=red]OLD TEXT[/color]','[color=red]NEW TEXT[/color]')
    Edit the red pieces to make appropriate string replacements in posts.

    Comment

    • yellowpinky
      New Member
      • Apr 2003
      • 24

      #3
      Also check into mod_rewrite if you are on apache.

      You can set up your old website so that if people type in their browser or otherwise surf to your old website, they will get automatically forwarded to the corresponding page on the new domain.

      Comment

      • foxfirediego
        New Member
        • Aug 2005
        • 17
        • 3.6.x

        #4
        Originally posted by Jake Bunce
        Run a query like this on your database (backup first):

        Code:
        UPDATE post
        SET pagetext = REPLACE(pagetext,'[COLOR=red]OLD TEXT[/COLOR]','[COLOR=red]NEW TEXT[/COLOR]')
        Edit the red pieces to make appropriate string replacements in posts.
        Thanks Jake, works well in my test forum!

        Originally posted by yellowpinky
        Also check into mod_rewrite if you are on apache.

        You can set up your old website so that if people type in their browser or otherwise surf to your old website, they will get automatically forwarded to the corresponding page on the new domain.
        could you point me the way? using .htaccess?

        Comment

        • yellowpinky
          New Member
          • Apr 2003
          • 24

          #5
          .htaccess on old site contains:
          RewriteEngine On
          RewriteRule ^(.*)$ http://www.new.com/$1 [R=301,L]

          Comment

          • foxfirediego
            New Member
            • Aug 2005
            • 17
            • 3.6.x

            #6
            thanks m8

            Comment

            Related Topics

            Collapse

            Working...