graham23s Posted April 26, 2009 Share Posted April 26, 2009 Hi Guys, I'm sorry if this is the wrong section, what i am trying to so is: currently all my products on my ecommerce site look like: productid=1234 i was trying to change it so the actual product name is show: product-name-for-id-1234 is there any tutorials on how i would best go about this? thanks for any help guys Graham Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted April 26, 2009 Share Posted April 26, 2009 Your not making much sense. You need to explain yourself more clearly Quote Link to comment Share on other sites More sharing options...
jackpf Posted April 26, 2009 Share Posted April 26, 2009 Do you mean mod rewrite? Quote Link to comment Share on other sites More sharing options...
graham23s Posted April 26, 2009 Author Share Posted April 26, 2009 Hi Wild, I meant to change this type of URL: product.php?id=5 to: product-name.html so the URL's are more SEO friendly. thanks mate Graham Quote Link to comment Share on other sites More sharing options...
jackpf Posted April 26, 2009 Share Posted April 26, 2009 Yeah, that's mod rewrite Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted April 26, 2009 Share Posted April 26, 2009 This is archived by mod_rewrite. However it cannot convert your product ids to your actual product names. You'll have to modify your script so it works like so product.php?id=product_name_here Now with mod_rewrite you can do RewriteEngine On RewriteRule ^([a-z0-9_-]+).html$ product.php?id=$1 So when you go to http://yoursite.com/product_name.html it'll actually be calling product.php?id=product_name mod_rewrite tutorial Quote Link to comment Share on other sites More sharing options...
graham23s Posted April 26, 2009 Author Share Posted April 26, 2009 Hi Guys, thanks for that i understand better now, the way my site is setup i use id's like: product.php?id=1 instead of the actual product name like: product.php?id=product_name_here Does that make it any harder for me, or does the same basic rules apply like above? thanks guys Graham Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.