Jump to content

Convert Original Url To Friendly Url And Display It In Browser's Address Bar


thara

Recommended Posts

In my website there is a link to registered tutors. That link is something like this

 

http://www.lankainstitute.com/profiles/centers/index.php?code=1203&institute=Montana+Higher+Educational+Institute#page=art-section

 

So I need to rewrite this link and after rewrite it want to display in my browser's address bar something like this:

 

www.lankainstitute.com/1203/Montana-Higher-Educational-Institute

 

Can anybody tell me is it possible to rewrite above original URL to my expected URL and can display it in address bar?

Thank you.

No, luckily you cannot do this because it would be a huge problem with security. Just think about phishing sites.

 

What you can do is edit the .htaccess file to allow you to set variables like that (which you need to parse with PHP), and you could have the page set up correctly then. That's a pretty popular way of doing it and the way I do it. Then you could call that second URL and it would do everything you want.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.