How to make SEO friendly URL structure using PHP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rahulephp
    New Member
    • Sep 2009
    • 59

    How to make SEO friendly URL structure using PHP?

    Hi,

    I need to send product id with URL something like this:
    Code:
    http://www.example.com/product.php?id=292&name=sony-digital-camera
    But this URL is not good enough for seo.
    Can anyone please let me know how to pass the ids and name (without "product.ph p") so that I will extract the id later
    Code:
    http://www.example.com/sony-digital-camera-292.php
    All the operation takes place at "product.ph p" so I can't ignore it.
    But I don't want "product.ph p" page to be shown in URL.

    After rendering "product.ph p" page with respective product id, I'll get all of the parameters like name, price, description etc.
    Then now the URL of page would have to be (like this)
    Code:
    http://www.example.com/sony-digital-camera-292.php
    (without "product.ph p")

    Thank you in anticipation
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    That URL is fine for SEO. This is 2010. :)

    Comment

    • rahulephp
      New Member
      • Sep 2009
      • 59

      #3
      Thank you Markus,
      But it would be good for SEO if the URL's doesn't contain Sessions or Ids etc. If any URL having keywords and is ending with .php or .html etc tags. Then Google consider such URL's as Static URL.

      Do you have any idea regarding this?

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Sure, but Google is much smarter than that now.

        Anyway, check out mod_rewrite if you're using apache, and also see these google search results for .htaccess files.

        Comment

        • Iflexion
          New Member
          • May 2010
          • 1

          #5
          Working with WP there's a special plugin called Custom Permalinks as far as I remember... Using this plugin you can modify the url of each article when you write it and prepare for posting.

          Comment

          Working...