.htaccess for domain/folder change

Discussion in 'Apache' started by Pablo12CR, Jan 24, 2011.

  1. #1
    I've a vbulletin board that has been off for about 5 months, now there is a new domain change and folder name change, I still have internal links that point to the old domain(and folder), and I need to fix internal links someway...

    The .taccess should redirect domain and folder:

    OldDomain.com/foro
    Code (markup):
    to:
    
    NewDomain.net/forum
    Code (markup):
    See, new domain is .NET and new folder is /FORUM

    If this htaccess changes the domain:

    
    
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(.*)olddomain.com [NC]
    RewriteRule ^(.*)$ http://newdomain.net/$1 [R=301,L]
    Code (markup):
    How can i get this to change folder too??? or what htaccess should I use :confused:
     
    Pablo12CR, Jan 24, 2011 IP
  2. gopkris2000

    gopkris2000 Peon

    Messages:
    86
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    //////RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(.*)olddomain.com [NC]
    RewriteRule ^(.*)$ http://newdomain.net/$1 [R=301,L]//////

    This is used for 301 redirect. Try to command these lines in your .htaccess and then check your internal links, also make sure all your customized links to newdomain.net.
     
    gopkris2000, Jan 25, 2011 IP
  3. Pablo12CR

    Pablo12CR Member

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #3
    Doesn't work, I use Advanced Friendly URLs in vbulletin and the old forum links wont redirect to new domain with that...
     
    Pablo12CR, Jan 25, 2011 IP