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) Link to comment https://forums.phpfreaks.com/topic/136918-something-url/ 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. Link to comment https://forums.phpfreaks.com/topic/136918-something-url/#findComment-715053 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? Link to comment https://forums.phpfreaks.com/topic/136918-something-url/#findComment-715056 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 Link to comment https://forums.phpfreaks.com/topic/136918-something-url/#findComment-715057 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.