1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Dynamically Created Web Pages - For Lead Generation

Discussion in 'Black Hat SEO Tools' started by webmarketingmaster, May 5, 2010.

  1. webmarketingmaster

    webmarketingmaster Regular Member

    Joined:
    Aug 15, 2009
    Messages:
    240
    Likes Received:
    39
    Location:
    Chicago, USA
    Does anyone know how to do this?

    Code:
    http://www.businesscardprofits.com/mike.smith
    Try putting your name /your.name


    Its pretty cool how this guy created a page that dynamically builds based on the /firstname.lastname

    I want to do this with one of my sites and would love to figure out how he did it.

    Thanks all
     
  2. voyevoda

    voyevoda Regular Member Premium Member

    Joined:
    Mar 21, 2010
    Messages:
    217
    Likes Received:
    97
    Location:
    Eastern Front
    Try this:


    .htaccess

    Code:
    RewriteEngine On
    RewriteRule ^(\w+)\.(?!(?:php|html))(\w+)$ /welcome.php?first_name=$1&last_name=$2 [L,NS]

    welcome.php

    Code:
    <?php
    
      $first_name = ucfirst($_GET['first_name']);
      $last_name = ucfirst($_GET['last_name']);
    
      echo "Hello, $first_name $last_name.";
    
    ?>

    If you host any static assets at the root of your site (e.g., site.com/logo.png), you will need to add their filename extensions to the php|html section of the RewriteRule so it doesn't think png is a person's last name. You should probably also manually sanitize the first and last name, but I don't think it's a big deal in this case.

    Let me know if there are any issues. :)
     
    • Thanks Thanks x 1
  3. webmarketingmaster

    webmarketingmaster Regular Member

    Joined:
    Aug 15, 2009
    Messages:
    240
    Likes Received:
    39
    Location:
    Chicago, USA
    Hey voyevoda, Thank you..!

    I did find a script online for $47

    Code:
    http://simplepersonalurls.com/your.name
    I'll give the code you gave me to my web developer and see if he can get it working. Im a sales/marketing guy.. not a programmer.

    I appreciate your help.