Search Optimization
  Home arrow Search Optimization arrow Page 4 - 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 - ForceType


    (Page 4 of 4 )



    Another way to make dynamic URLs appear static is by using Apache’s ForceType method in combination with a PHP command to interpret URLs like: www.example.com/articles/21/0.html as referring to a page called "articles" which is executed as a PHP script. This can be accomplished by inserting a line like this into the .htaccess file in the root of your web documents directory:

    ForceType application/x-httpd-php

    Now create a file called "articles":

    $nav = $_SERVER["REQUEST_URI"];
    $script = $_SERVER["SCRIPT_NAME"];
    $nav = ereg_replace("^$script", "", $nav);
    $nav = str_replace(".html", "", $nav);
    $vars = explode("/", $nav);
    $article = $vars[1];
    $page = $vars[2];
    require("/index.php?act=articles&id=".$article."&page=".$page);
    ?>

    It works in a similar way as the mod_rewrite example does, but with a little more work.

    Advantages

    One big advantage to using dynamic pages as opposed to static pages is the ability to create content that is constantly changing and updated in real time. You can use the tricks above, combined with RSS feeds from other sites and other automatically “fresh” content to boost your ranks in Google and many other search engines.

    Another advantage to using PHP is that you can make simple modifications to many scripts to create relevant page titles. Since this is the most important factor in SEO, special attention should be given to creating title tags that accurately reflect the page’s current content. Any HTML templates that are used in PHP pages can be altered to contain this line: 

    <title><?=$page_title?></title>
    With this, $page_title can be set to a keyword rich text describing the page. Title text is also important in improving the click-through from SERP’s, so be sure that the title tags doesn’t read like spam, but more like a human created title.

    Conclusion
     
    Mod_rewrite and ForceType can be powerful tools for any webmaster to add to their arsenal when dealing with PHP. Which methods you want to use are up to you. I’ve employed both in my development for different purposes and they both serve me well.

    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · 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

    - SEO Overview and Tips for Beginners
    - 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





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