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.

Question about Masking a Domain Name

Discussion in 'HTML & Website Design' started by JoyHawkins, Jul 11, 2012.

  1. #1
    If someone can answer this for me, I might be the happiest person around.

    State Farm has over 17,000 agents and each agent has their own "microsite" that basically acts as their website but is attached to StateFarm.com.


    For example: statefarm.com/agent/US/NY/New-York/James-Lavelle-5NXJQ1YS000 is one agent's page.


    Each agent also usually has 1 or 2 domain names that they buy because it's way easier to market them. As you can imagine, giving out that long URL to a client is kind of not convenient.


    Several months ago, State Farm added some feature to their site that made it so you can't mask a domain properly. For example, manhattan-insurance.com is currently set up with "masking" selected as the forwarding type, but when you pull it up, you'll see it acts like a 301 redirect and the page lands on the long statefarm.com URL I referenced above. There is some code or feature or something in the statefarm.com URL that makes masking impossible. It didn't use to be there.


    However, I found an agent who got around it somehow and I have no clue how!! This agent - jayfrye.com has it set up properly and you'll notice the page lands on jayfrye.com NOT statefarm.com/agent/US/DC/Washington/Jay-Frye-WJYWR1YS000.


    Anyone know how he did it?
     
    JoyHawkins, Jul 11, 2012 IP
  2. mneodor87

    mneodor87 Member

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    28
    #2
    Most likely he's doing it through mod_rewrite in his .htaccess file. Google "mod_rewrite keep original url" and there will be a bunch about it.

    I don't know the exact syntax, but I bet that's what he's doing.
     
    mneodor87, Jul 11, 2012 IP
  3. WebFerret

    WebFerret Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You need to modify your htaccess file on your server, add this line of code:

    Redirect 301 /OLDPAGE.html http:/NEWPAGE.html

    Simply replace OLDPAGE.html and NEWPAGE.html with the necessary urls.
     
    WebFerret, Jul 12, 2012 IP
  4. flashblue

    flashblue Active Member

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #4
    You can redirect one domain to other one. But, you need to have the privilage of server to login via SSH.
     
    flashblue, Jul 18, 2012 IP