What is vldPersonals?

vldPersonals is a very easy to use dating/social software. It allows you to create a fully functioning & modern dating website in a matter of minutes. If You think it's too complicated - check vldPersonals!
Know more about how You can become a dating website owner

What is vldCrowd?

vldCrowd.com is the biggest unofficial community of vldPersonals owners. It is a place to share ideas and thoughts about Your dating website. It is a place to answer questions and receive answers.
Do You own a vldPersonals license? Don't hesitate and join!

Connect Today

Community members help each other to take their dating websites to the next level. Can You make your vldPersonals website better? Join and find out...

Connect With More Than 500 Dating Website Owners! Sign Up Today
490 2 4
This mod will fix all member profiles, so that if a member has a username:
UnluckyInLove
 
their url on your site would be yoursite.com/UnluckyInLove/
but sometimes may be references places internally in vld as yoursite.com/member/98/ (where 98 is their member id)
 
This mod will help with seo rankings when members link to their profile like:
http://www.yoursite.com/unluckyinlove
or
HTTP://WWW.YOURSITE.COM/UNLUCKYINLOVE
or
http://www.yoursite.com/member/98/
 
Despite the "case" etc all these profiles URLs will currently resolve and show the correct profile (UnluckyInLove) - which is great, However for search engines who may crawl these links all of a sudden you will have a duplicate content problem. As search engines treat pages as case sensitive. Each variation of case after the domain is considered another page.
 
This simple mod solves this. (backup before any mod)
In lib.member_profile.php:
 
After:
$profile_obj = get_members_details($id, 1);
 
Add:
if ( $PREFS->conf['fancy_urls'] && $id != $profile_obj['member_username'] ) redirect(VIR_PATH . $profile_obj['member_username'] . "/" );
 
Now to make vld redirect SEO friendly.
 
In fns.misc.php:
Find the function redirect($url, $request_uri = 0) (should be at the top)
 
JUST above (important):
header("location: $url");
 
Add:
header ('HTTP/1.1 301 Moved Permanently');
 
So it should look like:
 
Text

//------------------------------------------------
// Redirect user
//------------------------------------------------
function redirect($url, $request_uri = 0)
{
        if ( $request_uri && isset($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI'] && isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] ) {
                $_SESSION['REQUEST_URI'] = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
        }
        header ('HTTP/1.1 301 Moved Permanently');
        header("location: $url");
        exit;
}
// End function
 

Now the spiders will like the redirect, and spiders and all users who go to an incorrect "case" version of the link will be quickly redirected to the correct case. This doesn't improve usability, and would be mostly unnoticed to users, but it goes towards eliminating the chance of having duplicate member profiles that search engines hate.
 
So now:
http://www.yoursite.com/unluckyinlove
or
HTTP://WWW.YOURSITE.COM/UNLUCKYINLOVE
or
etc, etc, etc of all case variations
or
http://www.yoursite.com/member/98/
 
will all 301 redirect to the correct version:
http://www.yoursite.com/UnluckyInLove/
 
Of course if this member created their profile as
UNLUCKYINLOVE
All case variations will redirect to:
http://www.yoursite.com/UNLUCKYINLOVE/

Comments

Garry

  • Posted on 07/26/2010 04:01 AM
Thanks :) Just added to my 2.5.6 install.

db3204

  • Posted on 12/11/2009 08:05 AM
ok...got it....thanks

idealists

  • Posted on 12/11/2009 05:33 AM
Yes:
http://www.vldcrowd.com/db3204/ is the correct profile URL
 
Also the following is technically correct ( it will load your profile ), although it is all UPPER case:
http://www.vldcrowd.com/DB3204/
 
Also the following is technically correct ( it will load your profile ), although it is all MixEd case:
http://www.vldcrowd.com/Db3204/
 
My mod will SEO friendly redirect the later two, to the one which is most correct - the first. The first one is the same "case" as when you joined and entered your username.
 
This mod just prevents the possibility of having duplicated pages indexed by the search engine .
Currently if you linked to your vldcrowd profile in a post somewhere, like:
http://www.vldcrowd.com/DB3204/
The search engines would consider this to be a different page to your regular profile page that is linked to in vldcrowd everywhere as http://www.vldcrowd.com/db3204/ (because you originally typed in lower case)
 
Hope this makes more sense.

db3204

  • Posted on 12/11/2009 04:48 AM
Hey Idealists
 
I'm trying to follow but I'm not quite getting your meaning.
 
My site displays URLs just like vldCrowd. For example, if you click an icon image under Latest Visitors on vldCrowd, the URL looks like this: http://www.vldcrowd.com/db3204/
 
Isn't that the correct URL, even for search engines?

Log in to leave a comment