Help -- Url redirects that members can use?

Discussion in 'JavaScript' started by 1alpha, Dec 9, 2007.

  1. #1
    I need help on this one.

    I don't know if javascript, or php or .htaccess is the right solution for this one - so please advise. My programming skills are limited to html and cut and paste. With that in mind here is where I need help.

    I have a PHP script that lists properties. It gives each property a listing ID such as 44-10. The Url for the property would be
    http://www.mydomain.com/search_id.php?ID=44-10

    This is obviously too clumsy to use as a referal url for media advertising. Can I use javascript to redirect so that the member can use an url like
    http://www.mydomain.com/44-10 and have it redirect to http://www.mydomain.com/search_id.php?ID=44-10 ?

    If so, what is the best method and what is the code to use? I've spent hours looking on the Internet and have not found a solution.

    Thanks.

    Guy
    :confused:
     
    1alpha, Dec 9, 2007 IP
  2. hrcerqueira

    hrcerqueira Peon

    Messages:
    125
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    .htaccess is your tool. Try to google for .htaccess tutorial or mod_rewrite tutorial.
     
    hrcerqueira, Dec 10, 2007 IP