Taxa Posted December 14, 2008 Share Posted December 14, 2008 Hello. On websites like www.tinyurl and www.myspace.com, the user can create a link which looks like this: www.myspace.com/the_users_desired_url and www.tinyurl.com/the_users_desired_url. For a while I have been using someting like this: www.tinyurl.com?url=the_users_desired_url The page takes $_GET['url'] and finds information in the databse with $_GET['url'] as the key. How do I achieve the tinyurl like url? (www.tinyurl.com/someones_url) Quote Link to comment Share on other sites More sharing options...
ratcateme Posted December 14, 2008 Share Posted December 14, 2008 i would setup a 404 redirect with .htaccess then use $_SERVER['REQUEST_URI'] to get what page the user is trying o get to. Scott. Quote Link to comment Share on other sites More sharing options...
Taxa Posted December 14, 2008 Author Share Posted December 14, 2008 Thank you for your reply, but, doesn't this method cause errors with a search engine? Quote Link to comment Share on other sites More sharing options...
blueman378 Posted December 14, 2008 Share Posted December 14, 2008 i believe it is mod_rewrites in the htaccess Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.