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

    Join Date
    Nov 2004
    Posts
    19
    Rep Power
    0

    how to 301 redirect dynamic PHP pages?


    Hey All!

    Something I've been stumped on for quite a while. I have a X-Cart enabled web site that I recently got a MODIFICATION for called Dynamic Search-Engine-Friendly URLs. This basically keeps the PHP pages there but adds another layer to the storefront by way of self-refreshing (upon updates) HTML pages built for the SE's.

    Example: THIS [/home.php?cat=35] IS NOW [/compare-to-gucci-sunglasses-p-1-c-2.html] while the PHP code still lies beneath the new HTML regenerated HTML code. Is that confusing? Read about it here: http://www.safetynetweb.com/safetyshop/product.php?productid=1&cat=1&page=1

    NOW! What I would like to do is build 301 redirects for all my OLD php pages so google won't think I have DUEL sites (1 with PHP, the other with HTML.) I first tried doing this the HTACCESS file but that didnt work.

    How I did it: redirect 301 /home.php?cat=35 http://www.you.com/new.htm ---- that did NOT work! My plan was to include all the old php pages line-by-line.

    My question: Should I bust my butt trying to find a way to 301 redirect all my php pages or should I just leave my HTML pages (with PHP code underneath it) and let google figure out that I now run an HTML ONLY site? OR, should I find a way to 301 redirect these pages? For now, I have turned off the mod and am axiously waiting for your final thoughts.


    Thanks!!
    Last edited by SEO_AM; Feb 14th, 2005 at 08:53 AM. Reason: Removed live links.
  2. #2
  3. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Nov 2004
    Posts
    19
    Rep Power
    0
    bump! can anyone help me on this? or am I explaining wrong?
  4. #3
  5. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jun 2004
    Location
    Dallas, TX
    Posts
    77
    Rep Power
    15
    Unless you have external links pointing to one of the php pages, it should be ok to just let Google figure it out.
  6. #4
  7. Extremely Googled
    SEO Chat Good Citizen (1000 - 1499 posts)

    Join Date
    Dec 2004
    Posts
    1,035
    Rep Power
    501
    I wouldn't bother with htaccess personally.

    I'd use this instead
    Code:
    <?php
     header("HTTP/1.1 301 Moved Permanently");
     header("Location:./newpagehere.php");
     exit();
     ?>
  8. #5
  9. L8r
    SEO Chat Adventurer (500 - 999 posts)

    Join Date
    Sep 2004
    Location
    My New Found Land
    Posts
    876
    Rep Power
    15
    Naw, I'd use the htacess file. However, without looking at your situation in depth, you can get yourself into a lot of trouble. I would recommend hiring someone to do it for you. One wrong move and you're out of the serps.
  10. #6
  11. <-- No I am not Kermit
    SEO Chat Good Citizen (1000 - 1499 posts)

    Join Date
    Mar 2005
    Location
    Fort Worth, TX
    Posts
    1,015
    Rep Power
    19
    Originally Posted by Gr8ted3s
    Naw, I'd use the htacess file. However, without looking at your situation in depth, you can get yourself into a lot of trouble. I would recommend hiring someone to do it for you. One wrong move and you're out of the serps.
    I noticed a bunch of 404 error hits on my site in three subdirectories I deleted months ago. Three weeks ago it was over 30 subdir's and pages that were getting 404's. There is one subdir in partcular that is the main culprit (though it's 404's are much lower).

    Would it be dangerous to put a 301 redirect sending people/robots going there to the new subdir/page? Or since the 404's are reducing, should I leave it alone?
  12. #7
  13. L8r
    SEO Chat Adventurer (500 - 999 posts)

    Join Date
    Sep 2004
    Location
    My New Found Land
    Posts
    876
    Rep Power
    15
    I would say that it depends who/what are hitting you and why. If they are because of links to non-existant pages then I'd say either 301 them or add some content.

    If they are visitors then definitely add some content.

    If they are no-name bots or automated systems forget about them.

    It's thought by some that Google (and Yahoo/MSN?) will make up pages sometimes to catch cloakers/doorway makers. The idea is based on the premise that if you never get a 301 and the made up pages aren't VERY similar (like a custom 404) that you've got a page generator. How true is it? I dunno, never tested that one.

    I and others HAVE seen GBot hitting page names that never existed, so on the surface it appears that it may be true.

    Overall, I'd say once you figure out who/what is hitting you, I'd try to ascertain the why. Then, if it makes sense, do it.

    Better yet, a custom 404 that doubles as a classy site-map might serve your purpose much better ;)

Similar Threads

  1. dynamic pages not read by google
    By kunalsethi in forum Search Engine Optimization
    Replies: 15
    Last Post: Jan 3rd, 2005, 03:56 PM
  2. dynamic pages or better static pages
    By semo in forum Google Optimization
    Replies: 10
    Last Post: Dec 29th, 2004, 08:43 AM
  3. Google indexing php pages?
    By confiden in forum Google Optimization
    Replies: 16
    Last Post: Nov 12th, 2004, 02:44 PM

IMN logo majestic logo threadwatch logo seochat tools logo