I am trying to figure out how to get a page on my website, like : www.mypage.com/anyname to call to www.mysite.com/users.php?user=anyname but still show www.mypage.com/anyname What would I have to put in my htaccess file to make this happen? I want the person to be able to type in any username they want, and it shows teh page for users.php?whatevernametheyput Please help!!!!
Try This: if (isset($_GET['user'])) $_GET['user']=$user; echo "Hello $user"; else echo '<form action=users.php method=get> Username:<input type=text length=100 name=user> </form>'; Code (users.php):
thats not really what im looking for if they type in www.mysite.com/username i want them to be taken to www.mysite.com/users.php?user=username
Oh ok. Sorry, I misunderstood your question. I'm not a mod_rewrite expert, so won't really tell you I know how.
Take a look at my post here Unless you have only 1 page (users.php) you will still need to specify in the url what page to call, ie (www.mypage.com/users/anyname). Otherwise you should modify the rewrite example, then whenever a subfolder is specifed, the users.php would be called.