I am Creating a URL shortning service with core php, I created a Database storing long and short (generated after submission of the form) URL's. Is there any way i can make it like this that i dont have to use a page to acess the short URL, Let me explain in detail.
I have a
index.php
and it has a form, it takes a URL or long URL from the user and after validation of the URL i save the Long Url with a short 5-6 character string, i save this to my database, and i will send back the short URL to the User.To acess the short URL i created another page called
link.php
and i am listining for the querystring in this page request like thishttp://localhost:80/link.php?q=d3432hnc
.
Ans i am looking for this question -
So i am asking that is there any other way i can acess the short url just like https://localhost:80/jfkdasjfkajsd
without making a page and passing this url in the queryStrings like http://localhost:80/link.php?q=jfkdasjfkajsd
.