Solved

Url rewritting non www to www and Cloudfront CDN

Posted on 2013-01-30
1
792 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now