1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.htaccess replace all links,, abc.com/a.html to def.com/a.html

Discussion in 'Chitika' started by asim_nazir1, Dec 1, 2008.

  1. #1
    hi,

    ive got a website and hosting:
    www.garamtube.com with apthost

    now ive bought a domain with godaddy
    www.hdporn1.com

    www.hdporn1.com redirects fine to www.garamtube.com but i want to change all the links on the website from:

    www.garamtube.com/anypage.html
    to
    www.hdporn1.com/anypage.html

    how can i do this with .htaccess?
    thanks
     
    asim_nazir1, Dec 1, 2008 IP
  2. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #2
    /public_html/.htaccess in garamtube.com
    
    RewriteEngine on
    RewriteRule ^(.*)$ http://www.hdporn1.com/$1 [L]
    
    Code (markup):
    Hope it help. :)
     
    thuankkk, Dec 6, 2008 IP
  3. atlantisbusiness

    atlantisbusiness Peon

    Messages:
    309
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This worked for me, but then it reverted back the next day. Could this be an read-only problem on my server?
     
    atlantisbusiness, Jan 22, 2009 IP
  4. TheLab

    TheLab Banned

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thuankkk, thanks for this, it's really work as i need to redirect my old wordpress blog, thanks again mate!
     
    TheLab, Apr 18, 2009 IP
  5. asim_nazir1

    asim_nazir1 Peon

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    got it working, thanks for all your help!
     
    asim_nazir1, May 4, 2009 IP
  6. Sprouter

    Sprouter Well-Known Member

    Messages:
    426
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    130
    #6
    Hey thanks for the code :)
     
    Sprouter, May 17, 2009 IP
  7. Tsid

    Tsid Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    What do you mean by "reverted"? Just stopped working?

    Has your .htaccess reverted to an old one?

    Imo, that may happen at least in two cases:

    1. You were making changes at your control panel, that affected the auto-generated .htaccess and the hosting systems regenerated it.

    2. The hosting services check the file on a periodic basis and rewrite it according to the cpanel settings.. usually can be solved somewhere in the control panel settings.
     
    Tsid, May 22, 2009 IP
  8. luizeba

    luizeba Active Member

    Messages:
    265
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #8
    Hey mate! Really thanks for the code =P
     
    luizeba, May 24, 2009 IP