xposegrafix
asked on
Dynamic url to SEO Friendly urls using Apace Mod_rewrite
I would like to know how to convert a dynamic urls to more seo friendly urls using Apache mod rewrite.
E.g of dynamic urls
* http://www.domain.com/?p=portfolio
* http://www.domain.com/?p=contact
* http://www.domain.com/?p=portfolio&pid=52&page=thumbs
* http://www.domain.com/?p=portfolio&pid=52&page=photos&photoid=754
* http://www.domain.com/?p=portfolio&pid=52&page=photos&photoid=754&pages=2
to:
* http://www.domain.com/portfolio
* http://www.domain.com/contact
* http://www.domain.com/portfolio/sculptor-richard-serra/
* http://www.domain.com/portfolio/sculptor-richard-serra/pages/2/
Thanks for your time.
Polask
E.g of dynamic urls
* http://www.domain.com/?p=portfolio
* http://www.domain.com/?p=contact
* http://www.domain.com/?p=portfolio&pid=52&page=thumbs
* http://www.domain.com/?p=portfolio&pid=52&page=photos&photoid=754
* http://www.domain.com/?p=portfolio&pid=52&page=photos&photoid=754&pages=2
to:
* http://www.domain.com/portfolio
* http://www.domain.com/contact
* http://www.domain.com/portfolio/sculptor-richard-serra/
* http://www.domain.com/portfolio/sculptor-richard-serra/pages/2/
Thanks for your time.
Polask
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Not very helpful.
What was un-helpful? I thought the question was well answered. Were you not able to get what you wanted?
ASKER
Cause it didn't work.
Uhh, that would indicate to me that you might want to post a note about that in the question thread here to get clarifying information? "Didn't work" does not give us much to go on.
ASKER
ok, thank you
A better name for this might be "easy to remember URLs" because people might remember the sculptor's name before they would remember pid=52.
I would recommend that you implement a 404 handler, and connect it to a search page. That way, when I come to your site with a typo like this...
http://www.domain.com/portfolio/sculptor-richard-sierra/
... your site can respond with a page that says something like, "No sculptor-richard-sierra here. Do you want to see http://www.domain.com/portfolio/sculptor-richard-serra/"