Forum Moderators: phranque

Message Too Old, No Replies

How to rewrite Url to make search engine optimized

         

wstinnett

8:47 pm on May 4, 2007 (gmt 0)

10+ Year Member



Hello,

I am trying to rewrite a couple of urls to make them more search engine friendly.
mod_rewrite is loaded on the server where my site is hosted.
I have an .htaccess file in the root and I know to begin I start with RewriteEngine On.
What I don't know is the correct way to write the rule to get it to do what I want.
Whatever I use nothing happens.

I am wanting to take these urls:

http://example.com/default.php?cPath=25_48
http://example.com//product_info.php?cPath=25_48_86&products_id=81

And make them look like this:

http://example.com/productcategory
http://example.com/productcategory/product

I would greatly appreciate it if someone would help me with this.

Thanks,
wsttinnet

[edited by: tedster at 11:35 pm (utc) on May 4, 2007]
[edit reason] please use example.com [/edit]

jdMorgan

10:47 pm on May 4, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



wsttinnet,
Welcome to WebmasterWorld!

Several of the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com] may be quite helpful to you.

Jim

g1smd

12:04 am on May 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There have been several threads with similar questions in the last few weeks.

Browse the forum and copy out example code, then tweak it to what you require.

There is more chance to learn by doing things and experimenting.

wstinnett

11:26 am on May 8, 2007 (gmt 0)

10+ Year Member



Thanks for you all response. I am glad to be involved with WebMaster World.

I will look at the tutorials and posts. Thanks for the info.

wstinnett

g1smd

10:47 pm on May 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you get stuck, post what you have done, what code you have used, and what it was supposed to have done, and what it actually did...