#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    266
    Rep Power
    12

    Help with .htaccess from dynamic URl to static URL


    How do you write .htaccess file so taht it can translate following URL

    http://mypretenddomain.com/otherdomain.com

    into this

    http://mypretenddomain.com/catalog.php?mode=viewdomain&id=8&domain=otherdomain.com

    ID is the database id of otherdomain.com

    Please help
    Thanks
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7171
    .htaccess can't fetch an id from a database. You'll need to use a server side programming language to implement the database lookup and redirect.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo