简体   繁体   中英

Sitecore redirects to physical layout page instead of content tree item

So our client makes use of www.opensiteexplorer.org to review their site. The problem is when they search using the homepage URL (eg https://www.clientsitecoresite.com ), somehow it is being redirected to the physical layout page https://www.clientsitecoresite.com/layouts/custom/mycustomlayout.aspx

I disabled the customizations in httpRequestBegin pipelines but still the same issue.

I checked the IIS log and the request captured is the physical layout page.

We are using Sitecore 6.5 .

Appreciate any input regarding this issue.

Additional info:

Strange, somehow when using agents other than browsers the request (whatever page of the website) is redirected to the base layout. I used cURL curl.haxx.se to inspect the header and this is the result:

HTTP/1.1 301 Moved Permanently Cache-Control: no-cache, no-store Pragma: no-cache Content-Length: 185 Content-Type: text/html; charset=utf-8 Expires: -1 Location: http://www.clientsitecoresite.com/layouts/custom/baselayout.aspx Set-Cookie: ...... .....

The baselayout.aspx inherits from a class. In the OnLoad event of the base class, when access is via browser, the Request.Url is as expected. However, when using another agent (cURL.exe), the Request.Url somehow is changed to baselayout path.

Any idea which event or sitecore config could have caused this? We don't have robots.txt. I also tried taking out URL rewriting and whatever custom process after ItemResolver pipeline. The relevant domain's ensureAnonymousUser is set to true as well.

It might be worth to say that the issue is happening when I use HEAD request in cURL, however it seems alright with a GET request either with cURL or browser.

Do you mean after the initial request trying to get,the home, there's another another requesting the layout? Or the initial request is straight for the layout? in the second case do you have a referrer? I wouldn't care about your custom code, as is iis the one returning the aspx, i would investigate in the index where does that link come from... Do you have directory listing enabled? Any custom sitemap xlm? If your problem are only the logs on IIS, you could fix it, and logs the path of the item instead of the path of the layout as shown in this post: http://www.bolaky.net/post/IIS-75-Logging-with-Sitecore-6x-in-Integrated-Pipeline-Mode.aspx

I'd check the "action" attribute of any form tags you may have on your page. If this is set incorrectly (ie contains the path of your layout), it could be causing issues for non-JS enabled requests. I've seen this happen before when you have the action set via JS (not a good idea fwiw).

Failing that, I'd hit up Sitecore support as others have mentioned.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM