Options +FollowSymLinks
RewriteEngine on

RewriteRule ^100bestbuy/products/(.*)/$ /100bestbuy/search.php?categoryId=$1 [L,NC]

RewriteRule ^/100bestbuy/search-(.*)/$ 100bestbuy/search.php?id=$1 [L,NC]

RewriteRule ^/100bestbuy/product-([0-9]+)/$ 100bestbuy/product.php?id=$1 [L,NC]

RewriteRule ^/search/(.*)/$ search.php?categoryId=$1

any thing not working please tell where to modify the code

What is the error you are getting? I think you do not have to put the 1st forward slash in ^/100bestbuy/search-(.*)/$

no error is coming i removed the forward slash but also the url is coming as like that only.it is not customizing.

Ahh I think you misunderstood the whole thing about clean URLs. Its like this:
When you type the URL as http:/yourhost/100bestbuy/products/10/ it will actually refer the page given by http:/yourhost/100bestbuy/search.php?categoryId=10. It will not change the URL displayed in the browser to http:/yourhost/100bestbuy/search.php?categoryId=10

I think what you are doing is, you are giving the URL as http:/yourhost/100bestbuy/search.php?categoryId=10 and expect it to be changed as http:/yourhost/100bestbuy/products/10/ in the browser address bar. No that is not going to happen :). The whole point is making the ugly and complex URLs more clean and meaningful.

yeah u r right. now i got the who concept.

Problem Solved :)

Problem Solved :)

not fully but little i got the idea. can u tell me whether i did correct or not. i have written the above mentioned code in .htaccess and instead of /search.php?categoryid=22
i have given /mobiles/.

now i url i it is showing 100bestbuy/mobiles/.

is it true. tell me.

i have written the above mentioned code in .htaccess and instead of /search.php?categoryid=22
i have given /mobiles/.

Sorry I did not get what you said above
Are you saying that you wrote a new rule like below?

RewriteRule ^/100bestbuy/mobiles/(.*)$ 100bestbuy/search.php?id=$1 [L,NC]

what? coming to left side? can explain more clearly?

Sir.......

My site url is comming like www.site.com/exploits.php?id=1

how can i chng it to www.site.com/exploits/1

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.