Search Optimization
  Home arrow Search Optimization arrow Page 2 - PHP Search Engine Optimization
SEO Chat Forums  
Choosing Keywords  
Google Optimization  
Link Trading  
MSN Optimization  
Search Engine News  
Search Engine Spiders  
Search Optimization  
Web Directories  
Website Marketing  
Website Promotion  
Website Submission  
Yahoo Optimization  
SEO Tools
Adsense Calculator
AdSense Preview
Advanced Meta-Tags
Alexa Rank Tool
Check Server Headers
Class C Checker
Code to Text Ratio
CPM Calculator
Domain Age Check
Domain Typos
Future PageRank
Google Dance
Google Keywords
Google Search
Google Suggest
Google vs Yahoo
Indexed Pages
Keyword Cloud
Keyword Density
Keyword Difficulty
Keyword Optimizer
Keyword Position
Keyword Typos
Link Popularity
Link Price Calculator
Meta Analyzer
Meta Tag Generator
Multiple Link Popularity
Page Comparison
Page Size
PageRank Lookup
PageRank Search
Robots.txt Generator
ROI Calculator 
S.E. Comparison 
S.E. Keyword Position 
Site Link Analyzer 
Spider Simulator 
URL Redirect Check 
URL Rewriting 
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
SEO Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
SEARCH OPTIMIZATION

PHP Search Engine Optimization
By: Roger Stringer
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 38
    2005-01-26

    Table of Contents:
  • PHP Search Engine Optimization
  • Session IDs
  • Mod_rewrite
  • ForceType

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    PHP Search Engine Optimization - Session IDs


    (Page 2 of 4 )



    The first issue to deal with is PHP's tendency to add session ID numbers to links.

    This is caused by having the "enable-trans-sid" option turned on, and it creates links with an additional, long, nonsense-looking GET variable. In addition to making the links clunky, it gives spiders different URLs with the same content, which makes them less likely to treat the pages individually. They might not even index them at all.

    An example of this can be seen here:

    http://www.mysite.com/index.php?PHPSESSID=b5dbe844a2c69fadc58614eb9a94b0 ce

    Kind of ugly right? Now imagine being a search engine spider and seeing that long number change every time you look at the page. Not a pretty picture.

    A quick way to fix this is to disable the trans-id feature, if you have access, in php.ini by setting "session.use_trans_sid" to false. If you don’t have access to change php.ini, you can add this line to the .htaccess file in your root directory:

    php_flag session.use_trans_sid off

    This will make the Session IDs disappear from the URL.

    Friendly URLs

    A major goal in optimizing your PHP pages for search engines is to make them look and act like static pages. If you have a large site you can use Apache to fake static-looking URLs, or, with a smaller site, you can simply keep your GET variables to a useful minimum. In either case, however, never allow a spider to see links with different URLs to the same content. If the URL is different, the page should be, too.

    One of the major problems most webmasters have with getting their dynamic pages to index is URL cleanliness. Since many dynamic pages are created with GET variables, lots of pages have URLs that look like:

    Page.php?var=abc&var2=def&var3=ghi

    Most of the search engines will be able to follow this link, because it has three or fewer GET variables (a good rule of thumb is to keep the number of GET variables passed in the URL to less than three), but any more than three variables will cause you to run into problems. Try using less GET variables, and make them more relevant. Rather that useless id numbers, use titles and other keyword rich bits of text. This is an example of a better URL:

    Page.php?var=category&var2=topic

    If the page requires more variables, you may want to consider combining the variables by delimiting them with a hyphen or another unused character, and then splitting the variable in the target page.

    Next, we'll cover two methods of making your dynamic URLs more friendly. The first is mod_rewrite:

    More Search Optimization Articles
    More By Roger Stringer


       · Very usefull article. Thanks.other web articles (spanish) on...
       · Content management software has almost became a necessity for large content sites...
       · I've been looking at using this method and this approach seems to work for me....
       · not sure where you got that. But it's always been the style I showed you.Here's...
       · If we remove the session ID from the URL, what is the best way to maintain state...
       · If you remove it from the URL, then state is maintained transparently. The site...
       · Roger,I have the same question regarding session id, if you turn it off, customer...
       · yes, that's correct.I own quite a few sites, including sites with carts and I have...
       · The session is stored on the server, the user is sent a cookie referencing that...
       · This article is a joke, right?
       · This article is a joke, right?
       · Yes this article is joke, but only for jokers ;)By the way G R E A T E A R T I...
       · I think in the article it said drop the .htaccess file in your root. The example was...
       · Really useful.. Thanks!
     

    SEARCH OPTIMIZATION ARTICLES

    - Stumbling Blocks to Web Site Success
    - Web Pages to Include in Your Site
    - Big Sites Don`t Automatically Rule Search En...
    - You Need More Than One Site Map
    - The Whys and Hows of Video Search Optimizati...
    - An SEO`s Experience: 21 Rules for Performing...
    - An SEO Eyeful: Interview with Ronald Herskow...
    - Research Your Competition for SEO
    - How I Became Number 1
    - Popular SEO Myths
    - Meta Elements: A Field Guide
    - Optimize This Page Title
    - What to Consider When Hiring an SEO
    - Raising Your Visibility with LinkedIn
    - Optimize Your LinkedIn Profile





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway