I have an issue with a site that I did a global 301 to the new domain and the 301 works as it should but in the logs it is showing that google and yahoo are seeing the redirects as 302's and that isn't good. All links but internal content seems to be going just according to plan but the dynamic pages that are .jsp are all showing 302. I used the standard HTACCESS method in the root folder of the domain as follows and it appears to work; RewriteEngine On RewriteCond %{HTTP_HOST} ^(www\.)?mygorealty\.net$ [NC] RewriteRule ^(.*)$ http://www.las-vegas-homefinder.com/$1 [R=301,L] Code (markup): Since the logs show all internal pages being a 302 I then tried this in the apache httpd.conf file; <VirtualHost 70.86.117.46> ServerAlias mygorealty.net ServerAdmin JaredRitchey@TheBrokersEdge.com DocumentRoot /home/mygoreal/vegas BytesLog domlogs/mygorealty.net-bytes_log ServerName www.mygorealty.net [B]AS YOU CAN SEE I TRIED THEM ON INDIVIDUAL FOLDER BASIS WHICH ISN'T THE NORM[/B] RewriteEngine on RedirectMatch 301 (.*)\.jsp$ http://www.las-vegas-homefinder.com #RedirectMatch 301 property/details/(.*)\.jsp$ http://www.las-vegas-homefinder.com RewriteRule ^property/details/?(.*) http://www.las-vegas-homefinder.com/$1 [R=301,L] RewriteRule ^property/?(.*) http://www.las-vegas-homefinder.com/$1 [R=301,L] RewriteRule ^Las-Vegas/?(.*) http://www.las-vegas-homefinder.com/$1 [R=301,L] RewriteRule ^Las-Vegas/Real-Estate/?(.*) http://www.las-vegas-homefinder.com/$1 [R=301,L] RewriteRule ^/(.*) http://www.las-vegas-homefinder.com/$1 [L,R=301] User mygorealtors Group mygorealtors CustomLog /usr/local/apache/domlogs/mygorealty.net combined ScriptAlias /cgi-bin/ /home/mygorealtors/vegas/cgi-bin/ <IfModule mod_jk.c> JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 JkMount /servlets/* ajp13 </IfModule> </VirtualHost> Code (markup): The problem is I'm still getting 302s on JSP pages and I'm not sure how to fix it. Here is the latest log input as you can see; /property/details/577188.jsp [B]Http Code: 302[/B] Date: Aug 27 11:02:20 Http Version: HTTP/1.0 Size in Bytes: 297 Referer: - Agent: Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp) Code (markup): Any thoughts would be great. I'm sure there must be a way to forward all JSP pages to the root of the target domain via 301. /property/details/577188.jsp should just resolve to the new domain as well as any JSP extension. ~ JARED
P.S. this site had a WHM cPanel which at first the developer was unaware. So I added the 301 with the cPanel as well for each folder individually and still no luck. ~ Jared
I have worked with a couple of sites with that problem but some 302s are friendly and do not hurt you at all!! It depends what the re-direct is being used for!! I check to see if a re-direct is friendly or not HERE
thank you for your fast response. great tool and what I found is this LINK: *mygorealty.net/property/details/577188.jsp REDIRECTS TO: *las-vegas-homefinder .com/property/details/577188.jsp It should simply send all links to the *ttp://www.las-vegas-homefinder.com ~ Jared
that didn't seem to work. The redirect attempts to add property/details/577188.jsp to the target domain.
Yes I went in and deleted all the htaccess files in every single directory and put new ones with two lines as follows. RewriteEngine On Redirect 301 / http://www.las-vegas-homefinder.com/ Code (markup):
Yes I added a trailing slash and just removed from the httpd.conf file the other directives that may have been causing issues. So currently the HTACCESS files in the root of the domain reads as follows; RewriteEngine On Redirect 301 / http://www.las-vegas-homefinder.com/ Code (markup): It seems to be working but server logs I guess will tell me if the 302 is still present. Since no 302 is set it baffles me why the SE's would interpret it as such. I thank you for your help and I'll post back if the SE's see it correctly or not.
I had to clear my cache, I saw what you were referring and when I typed in http://www.mygorealty.net/property/details/590066.jsp it would initially attempt to 301 to http://www.las-vegas-homefinder/property/details/590066.jsp which of course does not exist. The idea behind this is the old domain is being dumped and all the articles although rank well are not going to be saved as per the site owner (not my idea) so are no longer needed. I'll have to see if the Search Engines see it correctly, if not then I'm stumped as to the reason behind the 302. ~ Jared
Looks like the 301 is showing up correctly. You can check from here, just enter the old domain http://www.seoconsultants.com/tools/headers.asp
Amazing how many clever tools I have in my OnlineTools bookmarks. Thanks for that link its one I've never seen before but serves enough purpose to get this project done. It appears the headers are correct. Now I can get the balance of features completed. Thank you sincerely for all your direction. ~ Jared