Hello,
I am in the following situation:
my site hadn't Index -Options rule in .htaccess and googlebot had indexed all my folders even if it had index.html or not.
After that if i search in google images for a picture from my site google display the image but when I press Visit Page insted I go to the page.html from the site where the image is used I am going to the folder where the image is located.
So, for example, if in my-page.html I use <img src="main-photo-folfer/2015-nighs-pictures/picfile.jpg> if I search in google images for this image when I press Visit Page I will arive at http://example.com/main-photo-folfer/2015-nighs-pictures/ . This is not a good experience for me, as the site owner but it is also a bad experience for the visitors because there is a long list with name of all images under that folder.
So, I want to make a redirection using mode_rewrite and I will check where the folder 2015-nighs-pictures is used in my site and I will redirect the user to that page. This is the simple part.
What is harder is how should I proceed in terms of headers response. Should I use 301 Permanently Removed , 302 Temporary Removed or even 202 OK ? From the point of view of the visitors it is not a problem, he will be redirected the the correct page and it will be a good experience for him, but how will interpret this header googlebot ?
If I use 301 will he understand that all images from the folder are Permanently Moved to my-page.html ? Will he interpret something like Go to my-page.html because all this folder is moved to new address ? If it is acting in this way than I will lose all my rankings from image search. He will deindexing all my pictures because at my-page.html he won't find all the images from 2015-nights-pictures.
If I will return 403 Forbiden status for googlebot will it still index all the pictures from those folders ?
Will it replace the link to http://example.com/main-photo-folfer/2015-nighs-pictures/ with the correct one http://example.com/my-page.html ?
I am talking here about a site with over 1000 different folders which are located in the main-photo-folder.
Thank you for supporting !
[edited by: aakk9999 at 9:52 am (utc) on Jan 16, 2015]
[edit reason] Replaced mysite.com with example.com to avoid auto-linking [/edit]