Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Ticket #277 (closed question: invalid)

Opened 6 years ago

Last modified 6 years ago

302 Always Follows 301?

Reported by: joe.bianco@… Owned by: permagne@…
Priority: major Component: 404Handler
Keywords: Cc:

Description

Hello,
I was able to get the 301 redirects to work in my dev environment but every time there is a 301 it is immediately followed by a 302 when I look at it in Fiddler. Is this the desired behavior? Is this bad for SEO? Here are the headers I get after typing http://local.alloy.com/oldco in the address which should do a 301 to http://local.alloy.com/company.

GET /oldco HTTP/1.1
Host: local.alloy.com
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.78 Safari/535.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: ASP.NET_SessionId=igklbjqzrolhxj45k4t5vu55; EPi:NumberOfVisits=1,2012-03-09T21:12:15

HTTP/1.1 301 Moved Permanently
Cache-Control: private
Location: /company
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 09 Mar 2012 21:41:58 GMT
Content-Length: 0


GET /company HTTP/1.1
Host: local.alloy.com
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.78 Safari/535.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: ASP.NET_SessionId=igklbjqzrolhxj45k4t5vu55; EPi:NumberOfVisits=1,2012-03-09T21:12:15

HTTP/1.1 302 Found
Content-Type: text/html; charset=utf-8
Location: http://local.alloy.com/company/
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Fri, 09 Mar 2012 21:41:58 GMT
Content-Length: 148


GET /company/ HTTP/1.1
Host: local.alloy.com
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.78 Safari/535.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: ASP.NET_SessionId=igklbjqzrolhxj45k4t5vu55; EPi:NumberOfVisits=1,2012-03-09T21:12:15

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Expires: Thu, 08 Mar 2012 21:41:59 GMT
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 09 Mar 2012 21:41:58 GMT
Content-Length: 10481


Thanks,
Joe

Change History

comment:1 Changed 6 years ago by steve@…

  • Status changed from new to closed
  • Resolution set to invalid

That is the EPiServer Url Rewriter. It will redirect to the /company/ address for you (note the trailing slash). Just have your redirect point there in the first place.

Also see #198 for a similar double redirect issue (that we are working on fixing).

Note: See HelpUser/Tickets for help on using tickets.