parse HTML title keywords to mod rewrite

Discuss practical ways rearrange URLs using mod_rewrite.

parse HTML title keywords to mod rewrite

Postby kellogs » Wed Nov 12, 2008 9:11 pm

Lets say my HTML TITLE says this

love-me.com - View Profile male / single / 20 years old / friend

URL

http://www.love-me.com/accounts.php?mod ... E4645BB558

How do i parse it into URL by using mod rewrite like the following

/accounts/mode/viewprofile/aid/12-E4645BB558/male-single-20%20years%20old/friend

thank you!
kellogs
 
Posts: 5
Joined: Thu Nov 06, 2008 6:51 pm

Postby richardk » Thu Nov 13, 2008 7:43 am

Try
Code: Select all
Options +FollowSymLinks -MultiViews

RewriteEngine On

RewriteRule ^accounts/mode/viewprofile/aid/([-0-9a-z]+)/.+$ /accounts.php?mode=viewprofile&aid=$1 [QSA,L]

But mod_rewrite won't change the links in the source of your pages.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 21 guests

cron