TIP: Start with shop.php rather than changing to index.php

Questions, tips and ideas related to marketing, SEO and Google.
Post Reply
winkleink
Experience Level 2
Experience Level 2
Posts: 77
Joined: Mon Aug 16, 2010 1:36 pm

TIP: Start with shop.php rather than changing to index.php

Post by winkleink » Mon Jul 23, 2012 1:43 am

I converted a number of sites from AOM Lite to AOM Full. A few of the first sites I did to get the shop to load by default I renamed shop.php to index.php.
All good and the sites worked.

With the upgrade I decided to make future updates easier and to be consistent I am now using shop.php on all the sites with DirectoryIndex shop.php in the .htaccess.
See http://www.aomtalk.com/2008/10/five-new ... tions.html for how to do this and other great tips.

Sites work perfectly. Then I checked my Google Webmaster Dashboard and each of these sites has between 5000 and 10,000 indexed pages that now give a 404 error. This means I have (hopefully temporarily) removed my sites from Google while it gets around to reindexing the sites.

So, my recommendation is use shop.php from the beginning with the .htaccess method to get it to load by default if that is what you want, otherwise when you change over it will effectively remove your pages from Google and it will hurt your earnings.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

winkleink
Experience Level 2
Experience Level 2
Posts: 77
Joined: Mon Aug 16, 2010 1:36 pm

Re: TIP: Start with shop.php rather than changing to index.p

Post by winkleink » Tue Jul 24, 2012 10:12 am

I was looking at this overnight and I found a way of reducing the impact with some code.

Create an index.php (or whatever the page that is now giving the 404 errors was called) and put the following code in it.

Code: Select all

<?php
$req = $_SERVER['QUERY_STRING'];
$website = $_SERVER['HTTP_HOST'];
$newUrl = "Location: http://".$website."/shop.php?".$req;
   header( $newUrl ) ;
?>
IMPORTANT: There cannot be anything else in the file. The

Code: Select all

<?php
has to be the first characters at the start of the file. If there is even a blank line or a space then this is seen as HTML code and the page will start to be interpreted and will give an error.

This effectively reads the Query and the Website name and puts it all back together but a shop.php.

Not sure if this will cause problems with duplicate content but my guess is that it shouldn't be too bad as it is a server header redirect rather than a META Refresh which requires the original page to be loaded, and parsed first before the redirect happens.

So, maybe the lesser of 2 evils. Some links with temporary duplicate content rather than no links and no duplicate content.

Albert.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

User avatar
littletoons
Experience Level 10
Experience Level 10
Posts: 1208
Joined: Mon Oct 01, 2007 9:53 am
Location: Atlanta, Georgia USA
Contact:

Re: TIP: Start with shop.php rather than changing to index.p

Post by littletoons » Wed Aug 01, 2012 10:14 am

Why not just put
DirectoryIndex /shop.php

in your .htaccess file and be done with it?
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

winkleink
Experience Level 2
Experience Level 2
Posts: 77
Joined: Mon Aug 16, 2010 1:36 pm

Re: TIP: Start with shop.php rather than changing to index.p

Post by winkleink » Wed Aug 01, 2012 1:13 pm

DirectoryIndex /shop.php works for future crawling.
But Google had indexed thousands of pages at index.php and so was directly looking for index.php and since I removed it a 404 was being reported.

Since putting in the code above on one of my more popular sites regular clicks and sales came back.

I was wondering if Google sees the above server side redirect as being OK or as duplicate content when it re-crawls the original 'index.php?' pages.

Albert
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

JordanRose
Posts: 1
Joined: Thu Aug 22, 2013 3:40 am

Re: TIP: Start with shop.php rather than changing to index.p

Post by JordanRose » Fri Aug 23, 2013 3:08 am

winkleink wrote:I converted a number of sites from AOM Lite to AOM Full. A few of the first sites I did to get the shop to load by default I renamed shop.php to index.php.
All good and the sites worked.

With the
led lights upgrade I decided to make future updates easier and to be consistent I am now using shop.php on all the sites with DirectoryIndex shop.php in the .htaccess.
See http://www.aomtalk.com/2008/10/five-new ... tions.html for how to do this and other great tips.

Sites work perfectly. Then I checked my Google Webmaster Dashboard and each of these sites has between 5000 and 10,000 indexed pages that now give a 404 error. This means I have (hopefully temporarily) removed my sites from Google while it gets around to reindexing the sites.

So, my recommendation is use shop.php from the beginning with the .htaccess method to get it to load by default if that is what you want, otherwise when you change over it will effectively remove your pages from Google and it will hurt your earnings.
I am glad you have shared such good information.. I will also try to use shop.php and hope it works well
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

GarryRose
Posts: 1
Joined: Tue Nov 26, 2013 3:12 am

Re: TIP: Start with shop.php rather than changing to index.p

Post by GarryRose » Fri Nov 29, 2013 10:09 pm

winkleink wrote:I converted a number of sites from AOM Lite to AOM Full. A few of the first sites I did to get the shop to load by default I renamed shop.php to index.php.
All good and the sites worked.

With the upgrade I decided to make future updates easier and to be consistent I am now using shop.php on all the sites with DirectoryIndex shop.php in the .htaccess.
See http://www.aomtalk.com/2008/10/five-new ... tions.html for how to do this and other great tips.

Sites work perfectly. Then I checked my Google Webmaster Dashboard and each of these sites has between 5000 and 10,000 indexed pages that now give a 404 error. This means I have (hopefully temporarily) removed my sites from Google while it gets around to reindexing the sites.

So, my recommendation is use shop.php from the beginning with the .htaccess method to get it to load by default if that is what you want, otherwise when you change over it will effectively remove your pages from Google and it will hurt your earnings.
Albert
Working to figure out AOM
EnergySavingOnline - CFL Bulbs, LED Bulbs,
solar panels and more
KiteIreland - Power Kiting, Kite Buggying and Kite Surfing gear as well as outdoor and camping equipment

UK Birthstone Direct - Birthstone necklaces, bracelets and earrings
Are you still able to convert AOM Lite to AOM Full sites? I am trying to build new site and I really hope you can help me out..Sorry for old thread reply but I will try to contact you ASAP.
Last edited by GarryRose on Sun Dec 01, 2013 9:04 am, edited 1 time in total.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

mcarp555
Admin
Admin
Posts: 4088
Joined: Thu Sep 14, 2006 5:19 pm
Location: United Kingdom
Contact:

Re: TIP: Start with shop.php rather than changing to index.p

Post by mcarp555 » Sat Nov 30, 2013 1:59 am

All you have to do to convert is to upgrade.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest