Hi
I am often seeing short urls, both in Facebook for usernames, and countless others.
I need to create short urls for a web site, much of the time it will need to be 'on the fly', to give a shorturl to a product.
ie. http://www.domain.co.uk/prod2218/
which may be for. index.php?page=product&id=2218&title=your product
Can anyone give a brilliant answer, as I don't see a simple method, and I am sure it'll be one of those answer that makes you go "ooohhh yeaahhh"....
How do you do short urls: www.domain.com/todayurl ?
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
How do you do short urls: www.domain.com/todayurl ?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: How do you do short urls: www.domain.com/todayurl ?
You'll be needing mod_rewrite for that (if you're using apache).
There are plenty of guides and tutorials on google. Just search apache mod_rewrite or something similar.
There are plenty of guides and tutorials on google. Just search apache mod_rewrite or something similar.