bander Posted August 23, 2006 Share Posted August 23, 2006 Hallo,Want to use RewriteRules for SEO friendly URLs, but I need a little bit help with it. I exactly know what end result I want but how to do it is something else;)It's about the following (ugly) URLwww.domain.com/?lang=tr&path=products/telephone/mobiel/samsung&item=1 (or with end slash in URL)to make it better readable for you:www.domain.com/ ?lang=tr& path=products/telephone/mobiel/samsung & item=1 (or with end slash in URL)With a RewriteRule I should have the following URL:www.domain.com/tr/products/telephone/mobiel/samsung/1 (or with end slash in URL)In PHP I should catch the following $_GET's$_GET['lang'] value stored: "tr"$_GET['path'] value stored: "products/telephone/mobiel/samsung"$_GET['item'] value stored: "1"A condition is that the parameterlength behind the &path.... is dynamic generated, so this can be 0 to more.The following example (Bold) obliges that 4 parameter is given in order to rewriteRewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/ /?lang=$1&[b]path=$2/$3/$4/$5[/b]&item=$6Can anybody help me with a practical example? I thank you. 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.