Dynamically Created Web Pages - For Lead Generation

webmarketingmaster

Regular Member
Joined
Aug 15, 2009
Messages
241
Reaction score
39
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
 
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. :)
 
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.
 
Back
Top