If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > Friendy URL using value from database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-11, 00:02
stoyleg stoyleg is offline
Registered User
 
Join Date: Jan 2011
Posts: 8
Friendy URL using value from database

I'm looking for a way to convert a URL to something friendly using values stored in a MySQL database.

I have a control panel which allows users to enter their own friendly URL, so for example if the user entered "my-friendly-url", the URL would change from...

http://www.domain.com/page.php?pid=4&id=37

to...

http://www.domain.com/my-friendly-url

I know you can convert URLs using .htaccess, but I have no idea how to use database values in place of the querystring. As far as I know it's not possible for .htaccess to connection to a database (?)

Drupal, Joomla etc have this function, but I don't know how they do it.

Thanks for any help.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On