0

I will like to distribute a javascript file with several of my clients, they have several thousands of unique visits a day on their pages, so my file will be called a lot of times, i don't want that pressure on my web server, so i bought a CDN storage from RackSpace.

Since here everything is ok, but the URL of the file, my CDN gives me a very long URL i will like to shorten to something like js-api.mysite.com, so my clients can add that URL to their sites.

I'm not very clear about 2 things:

  1. What type of redirect should i use in order to maintain my web server completely out? (i can buy anther domain if necessary)
  2. My original long URL is serve in https, do I need to consider that on the selection of the type of redirect?
DomingoSL
  • 365
  • 1
  • 4
  • 13

1 Answers1

0

You're doing it wrong - source from the CDN directly.

You don't have to go any further than the page source of this page:

    <meta name="og:image" content="http://cdn.sstatic.net/serverfault/img/apple-touch-icon@2.png?v=9b1f48ae296b"/>
    <meta name="og:title" content="Redirect to a CDN" />
    <meta name="og:description" content="I will like to distribute a javascript file with several of my clients, they have several thousands of unique visits a day on their pages, so my file will be called a lot of times, i don&#39;t want that " />
    <meta name="og:url" content="http://serverfault.com/questions/609568/redirect-to-a-cdn"/>
    <link rel="canonical" href="http://serverfault.com/questions/609568/redirect-to-a-cdn" />



    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script src="//cdn.sstatic.net/Js/stub.en.js?v=d142d951ee55"></script>
    <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/serverfault/all.css?v=01ae6db1af10">
MikeyB
  • 39,291
  • 10
  • 105
  • 189
  • 2
    Rackspace doesn't support CNAMEs with https and their cloud "buckets" have annoyingly long hostnames – Nathan C Jul 02 '14 at 14:13