#1
  1. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Feb 2011
    Location
    Tyler, Texas
    Posts
    37
    Rep Power
    31

    Avoid Query String Duplicate Content with Redirects


    Hi all. It's SEOTyler with a less keyword-stuffed name.

    To avoid query string and duplicate content issues, I was wondering if this is a successful work-around.

    Assuming PHP, pass a query-string based URL to a file that parses the query string, stores into session variables, and redirects to a page that uses the session variables.

    Example
    index.php
    Code:
    <a href="setsessions.php?mobile=true&wtf=true">Click this</a>
    setsessions.php
    Code:
    //If accessed directly (no Get variables), redirect and exit
       //Code to make that happen  goes here
    
    $_SESSION["mobile"] = $_GET["mobile"];
    $_SESSION["wtf"] = $_GET["wtf"];
    
    header("Location: http://domain.com/somefile.php");
    //Note that no content is stored on this page

    somefile.php
    Code:
    //Html tags and whatnot go here
    
    <?php if(!empty($_SESSION)): ?>
    You are viewing the <?php if($_SESSION["mobile"] == true: ?> mobile <?php else: ?> normal <?php endif; ?> version. 
    <?php endif; ?>
    This is very convenient from a development perspective, but I want to make sure I won't be screwing myself over.
  2. #2
  3. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Feb 2011
    Location
    Tyler, Texas
    Posts
    37
    Rep Power
    31
    Used a Q and A credit at SEOmoz. I'll see what they think of it.

Similar Threads

  1. 2 Questions: Backlink Count & Duplicate content
    By ffcrystals in forum Google Optimization
    Replies: 1
    Last Post: Aug 16th, 2006, 01:14 AM
  2. The duplicate content argument
    By Mr Mojo Risin in forum Google Optimization
    Replies: 4
    Last Post: Jun 20th, 2006, 06:18 PM
  3. duplicate content domain name query??
    By bow1uk in forum Google Optimization
    Replies: 0
    Last Post: Oct 6th, 2005, 04:00 AM
  4. Meta Redirects and duplicate content
    By Broker boy in forum Google Optimization
    Replies: 3
    Last Post: Apr 11th, 2005, 10:40 AM
  5. Result of a Google test.
    By Nintendo in forum Google Optimization
    Replies: 10
    Last Post: Aug 31st, 2004, 09:19 AM

IMN logo majestic logo threadwatch logo seochat tools logo