0

I am interested in making my website URLs friendlier for the eye (and Google) by implementing various directories rather than obscure ?id=xyz pages. Examples:

    /review.php?id=371

To

    /review/deja-vu/

And

    /reviews.php?sort_by=1&order=1&approved=1

To

    /reviews/asc/by_title/approved/

And so on..

However, when googling the subject, it seems that there are a lot of hints, tips and optimal practice suggestions available on the internet, but very little in actual guides or tutorials on how this is done fundamentally. Bits and pieces I managed to pick up imply that .htaccess and HTTP redirects are key, however...

  1. I can't do a simple replacement since the article name isn't actually in the URL (an ID must somehow become the title string assigned to the article)

  2. I need my site to link to the 'prettified' URLs, so I also need a PHP/MySQL component to the system (unless .htaccess code magically replaces all existing links on pages with pretty versions?)

Thus my question: How are friendly URLs done? My site uses PHP and calls its content from a MySQL database. Should I add a new MySQL table with two columns to translate specified URLs into shiny new ones, as in:

    Column 1: review.php?id=371  Column 2: review/deja-vu/

then replace all 'raw' hyperlinks on the pages with PHP using these values and use .htaccess magic to redirect? Maybe there's a better, more practical approach? Or maybe I'm entirely on the wrong track here?

ividyon
  • 584
  • 2
  • 4
  • 17
  • 1
    This question appears to be off-topic because it is about SEO – John Conde Nov 26 '13 at 16:48
  • 1
    This may answer your question: http://stackoverflow.com/questions/812571/how-to-create-friendly-url-in-php or http://stackoverflow.com/questions/17015271/how-to-use-get-parameter-to-make-seo-friendly-urls or http://stackoverflow.com/questions/18822460/seo-friendly-url-using-php – falconspy Nov 26 '13 at 16:50
  • Is this URL optimization not referred to as SEO? I thought it's what makes search engines parse results easier and makes it more accessible. – ividyon Nov 26 '13 at 16:50
  • @JohnConde - it's really not about SEO - it's just about implementing readable links. The OP is just mis-using SEO as a synonym. The question is OK. – Ben D Nov 26 '13 at 16:51
  • I changed my question and the tags to reflect my newly found knowledge from the questions falconspy linked. Thank you! – ividyon Nov 26 '13 at 17:12

0 Answers0