Mod_rewrite Make_url_friendly For Users
Hey there...
i have had spend some hours to figure my problem out... also searched alot, but can find any docs about that...
Icy Phoenix has his own make_url_friendly function...
Quote:
includes/functions_rewrite.php
// Profile
'/(?<!\/)(.\/){0,1}' . PROFILE_MG . '\?mode=viewprofile((&)|(&)){0,1}' . POST_USERS_URL . '=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
// Profile
"make_url_friendly('\10') . '-profile-u\5.html' . if_query('\6') . stripslashes('\9\10') . '</a>'",
.htaccess
RewriteRule ^.+-profile-u([0-9]*) ./profile.php?mode=viewprofile%{QUERY_STRING}&u=>
RewriteRule ^.+-profile-u([0-9]*) ./profile.php?mode=viewprofile%{QUERY_STRING}&u=$1 [L]< [L]
I have changed this a bit, and have
ATM this:
Quote:
includes/functions_rewrite.php
// Profile
'/(?<!\/)(.\/){0,1}' . PROFILE_MG . '\?mode=viewprofile((&)|(&)){0,1}' . POST_USERS_URL . '=([0-9]+)((&)|(&)){0,1}([^>]+>)(.*?)<\/a>/e',
// Profile
"make_url_friendly('\10') . '-user\5' . if_query('\6') . stripslashes('\9\10') . '</a>'",
.htaccess
RewriteRule ^.+-user([0-9]*) ./profile.php?mode=viewprofile%{QUERY_STRING}&u=>
RewriteRule ^.+-user([0-9]*) ./profile.php?mode=viewprofile%{QUERY_STRING}&u=$1 [L]< [L]
Which results in:
http://www.domain.com/NICKNAME-user2
But i want to have it like this (i need this for an dynamic image):
http://www.domain.com/member/NICKNAME/
I´ve played a bit with the make_url_friendly function to achieve that... the rewrite was ok, but the images on the profile were not displayed... due to the "member"-path
The next thing is... i dont really know for what the "\10" | "\6" in the make_url_friendly function stand for...
anyone can help me with that please?