Submit Express Forums & Search Engine Friendly URLs

Please only post Search Engine and Webmaster Related stuff.
Post Reply
mandarin

not sure its SE friendly

Post by mandarin »

I am getting session ids in the forum indexpage when logged out. Thats not a good thing for the search engines. Use the code below to remove session ids for bots:

Code: Select all

#-----[ OPEN ]------------------------------------------
#
includes/sessions.php

#
#-----[ FIND ]------------------------------------------
#
        //
        // Does a session exist?
        //

#
#-----[ BEFORE, ADD ]------------------------------------------
#
    $user_id = ( isset($sessiondata['userid']) ) ? intval($sessiondata['userid']) : ANONYMOUS;

    if($user_id != ANONYMOUS)
    {

#
#-----[ FIND ]------------------------------------------
#
return $userdata;

#
#-----[ BEFORE, ADD ]------------------------------------------
#

    }
    else
    {
       $userdata['session_id'] = '';
       $userdata['session_ip'] = '';
       $userdata['session_user_id'] = $user_id;
       $userdata['session_logged_in'] = 0;
       $userdata['session_page'] = '';
       $userdata['session_start'] = '';
       $userdata['session_time'] = '';

    }

#
#-----[ FIND AND DELETE ]------------------------------------------
#

       // If we reach here then no (valid) session exists. So we'll create a new one,
       // using the cookie user_id if available to pull basic user prefs.
       //
       $user_id = ( isset($sessiondata['userid']) ) ? intval($sessiondata['userid']) : ANONYMOUS;


#
#-----[ FIND ]------------------------------------------
#
        //
        // Delete existing session
        //

#
#-----[ BEFORE, ADD ]------------------------------------------
#
    if(isset($session_id))
    {


#
#-----[ FIND ]------------------------------------------
#
        setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
        setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
#
#-----[ AFTER, ADD ]------------------------------------------
#

    }
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
[/code]

coop99
Posts: 163
Joined: Sat Jul 30, 2005 2:43 am
Location: Seattle, WA
Contact:

Re: not sure its SE friendly

Post by coop99 »

mandarin wrote:I am getting session ids in the forum indexpage when logged out. Thats not a good thing for the search engines. Use the code below to remove session ids for bots:
No need! The SE's (especially Google) love the url structure and rank nearly all of the threads and posts highly based on keywords in the title.

Go ahead and look at the 5th result down out of 74,600,000

http://www.google.com/search?hl=en&lr=& ... tools+list

The url structure has no session IDs in search results that I have seen.
[url=http://www.searchenginefeeds.org/feeds/]Search Engine Feeds - SEO News & Article Feeds[/url]

overdriveelectronics
Posts: 305
Joined: Mon Jun 12, 2006 5:39 am
Contact:

Post by overdriveelectronics »

Yeah I have seen the pages get good rankings, its nice to see from a traffic generation standpoint!
[url=http://www.overdriveelectronics.com]Electronics[/url]

shaggy35
Posts: 11
Joined: Thu Oct 19, 2006 7:52 pm
Contact:

search engine friendly urls

Post by shaggy35 »

I use a great product call ISAPI-rewrite. Basically it rewrites your urls on the fly using Regular Expressions (its a windows version of what mod rewrite does on apache). Basically, you can create full on database driven websites without any ? etc. Works great

Shaggy
[url=http://www.bigtripper-lakedistrict.co.uk/]Lake District[/url]

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests