How to get desired URL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bandy
    New Member
    • Mar 2010
    • 25

    How to get desired URL

    Hi there,

    pardon me or suggest me the tag for this question.

    I have developed a website, using Twitter API. Now a little but important problem i am facing is expected url.
    There will be users on my site who are going to get details with their user name.

    My site url is : www.mysite.com/
    it also works on : www.mysite.com/home.php
    and : www.mysite.com/FinalShow01.php

    Now what i want is user should be searched when he enter his name as : www.mysite.com/username


    I also tried this thing on server cpanel, but could not get it done.

    Please Help!!!
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    You need to use URL rewrite to check if no file exists (or check that username is not shaped like a file), then rewrite it to something like "?user=username " hand it off to a php page that will check it against a database, IF no user is found, a 404 should be displayed.

    Look into your server's url rewrite features.


    Dan

    Comment

    Working...