Gallery2 – removing "302 redirects".
I noticed that our [Gallery2](http://gallery.ibao.net) webpage has been ignored by Google Images. I researched this topic a bit and found the [list of search engine optimization tips for Gallery](http://gallery.menalto.com/node/36854), among which there was a line about avoiding “302 redirects”.
As it turns out Gallery uses a “302 redirect” to load “main.php“ on the initial load and it is also redirected from “index.php“, which is claimed to incur some anti-spam penalties for the Google engine. I don’t know whether this is true or not, but to be on the safe side, I decided to remove the reidirects.
Here’s what I did:
1. Move my site-specific “index.php“ somewhere else.
2. “ln -s main.php index.php“
3. Add the following line in the site-specific “config.php“:
define(‘GALLERY_MAIN_PHP’, ‘index.php’);
Everything seems to work now. We will see in a couple of weeks how well it works for the search engines
March 7th, 2006 at 1:36 am
If you upgrade to Gallery 2.1, you can use the sitemap module, which will generate a Google sitemap for your Gallery that you can submit to Google. This will provide Google with a complete map to your Gallery install and let it spider your photos much more efficiently.
December 8th, 2006 at 6:39 am
Some of these 302 redirects are merely tracking URLS and are not a deliberate attempt to hijack your web page so please read all of the following before taking action.
May 9th, 2007 at 4:57 pm
Thanks for the simple solution, that was a problem to give people direct links to my galleries.
Thank a lot
Now I’m playing around stupid wpg2 plugin to remove such stupid redirects out from there.
May 9th, 2007 at 5:12 pm
[...] довольно проÑто. Решение очень проÑтое – читаем по ÑÑылке или в английÑкой верÑии данного [...]