How do I redirect visitors using .htaccess?

Discussion in 'Programming' started by chris123, Aug 12, 2008.

  1. #1
    I've got some visitors coming from a link place on a website, I know that these visitors are specifically interested in one thing, how do I go about redirecting them to a single page on my site using the .htaccess file?

    I'm guessing it's got something to do with their refferer...
     
    chris123, Aug 12, 2008 IP
  2. pubdomainshost.com

    pubdomainshost.com Peon

    Messages:
    1,277
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    pubdomainshost.com, Aug 12, 2008 IP
  3. chris123

    chris123 Peon

    Messages:
    1,218
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That's what I'd usually do, but this time I want to redirect ONLY the visitors that come FROM a certain website. Is that possible?
     
    chris123, Aug 12, 2008 IP
  4. serialCoder

    serialCoder Guest

    Best Answers:
    0
    #4
    yes. you can try and get the referer and based on that redirect to the page you want. if you're using php and need some assistance, i can probably help you out :)
     
    serialCoder, Aug 12, 2008 IP
  5. chris123

    chris123 Peon

    Messages:
    1,218
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I want to use the .htaccess file instead of php, the sites not in php.
     
    chris123, Aug 12, 2008 IP
  6. serialCoder

    serialCoder Guest

    Best Answers:
    0
    #6
    serialCoder, Aug 12, 2008 IP
  7. chris123

    chris123 Peon

    Messages:
    1,218
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #7

    that looked promising but I couldnt get it to work. thank though. :eek:
     
    chris123, Aug 12, 2008 IP
  8. serialCoder

    serialCoder Guest

    Best Answers:
    0
    #8
    hmm, did you made sure htaccess is enabled? if you want i can provide a little assistance :)
     
    serialCoder, Aug 12, 2008 IP