Solved

Url rewritting non www to www and Cloudfront CDN

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.net show message while code is running 3 18
jquery progress bar 3 43
Following an example - Why do I need to click Save button twice? 3 26
Save ms data to server side. 19 46
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 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