Link to home
Start Free TrialLog in
Avatar of xposegrafix
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
ASKER CERTIFIED SOLUTION
Avatar of Dushyant Sharma
Dushyant Sharma
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi, Polask.  Just a note... "SEO-friendly URLs" is a misleading concept.  The search engines do not care a bit about what your URL contains.  They look at things like (more or less in order) how many meaningful and important sites link to your site, the HTML <title> tag, the "meta description", the HTML <h1> tag and the text of your page, especially near the top.

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/"
Avatar of xposegrafix
xposegrafix

ASKER

Not very helpful.
What was un-helpful?  I thought the question was well answered.  Were you not able to get what you wanted?
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.
ok, thank you