By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,963 Members | 1,994 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,963 IT Pros & Developers. It's quick & easy.

How to make SEO friendly URL structure using PHP?

rahulephp
P: 59
Hi,

I need to send product id with URL something like this:
Expand|Select|Wrap|Line Numbers
  1. 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.php") so that I will extract the id later
Expand|Select|Wrap|Line Numbers
  1. http://www.example.com/sony-digital-camera-292.php
All the operation takes place at "product.php" so I can't ignore it.
But I don't want "product.php" page to be shown in URL.

After rendering "product.php" 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)
Expand|Select|Wrap|Line Numbers
  1. http://www.example.com/sony-digital-camera-292.php
(without "product.php")

Thank you in anticipation
May 9 '10 #1
Share this Question
Share on Google+
4 Replies


Markus
Expert 5K+
P: 6,050
That URL is fine for SEO. This is 2010. :)
May 9 '10 #2

rahulephp
P: 59
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?
May 10 '10 #3

Markus
Expert 5K+
P: 6,050
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.
May 10 '10 #4

P: 1
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.
May 18 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.