Solved

Url rewritting non www to www and Cloudfront CDN

Posted on 2013-01-30
1
847 Views
Last Modified: 2013-02-03
I'm using managed fusion to rewrite non www to www.

RewriteCond %{HTTP_HOST} ^mysite.com$ [NC]
RewriteRule ^/(.*)$ http://www.mysite.com [R=301,NC,L]

However, this is messing up cloudfront

When I make a request to
mycode.cloudfront.net/images/logo.png

I get redirected to www.mysite.com
When i remove the cond and rule, it works as expected.


The origin in cloudfront is setup as
mysite.com

I'm not sure I understand why this is happening, any suggestions?
0
Comment
Question by:JRockFL
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

by:
Kumaraswamy R earned 500 total points
ID: 38838328
Hi

bellow url give some idea

Using CloudFront CDN for Sitecore media content

http://herskind.co.uk/blog/2012/04/using-cloudfront-for-sitecore-media-content

IIS URL Rewrite – rewriting non-www to www

http://weblogs.asp.net/owscott/archive/2009/11/27/iis-url-rewrite-rewriting-non-www-to-www.aspx
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question