Announcement

Collapse
No announcement yet.

Change Domain

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    http://forum.abc.com/forumdisplay.php?f=1
    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
    http://forum.abc.com/showthread.php?t=1
    it's replace to
    http://forum.xyz.com/showthread.php?t=1
    Thanks

  • #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


    • #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


      • #4
        Originally posted by Jake Bunce View Post
        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 View Post
        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


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

          Comment


          • #6
            thanks m8

            Comment

            Related Topics

            Collapse

            Working...
            X