Fetching contributors…
Cannot retrieve contributors at this time
47 lines (35 sloc) 1.25 KB

When recommending any new service like Dropbox or DigitalOcean, I send my referral codes to the potential customer in hopes that they’ll sign up, and my account will be credited accordingly.

Instead of having to look up these referral codes for each of these interactions, I’ve created a few nginx aliases to make the links easier to share.

In my domain’s nginx configuration file, I’ve added:

{% highlight bash %}


server { listen 80; server_name;

location /do { rewrite ^/do?$ permanent;

location /db { rewrite ^/db?$ permanent;
} } {% endhighlight %}

You can also alias fequently used urls like the jQuery cdn:

{% highlight bash %} location /jq { rewrite ^/jq?$ permanent; } {% endhighlight %}

The above url will even work in a script tag:

{% highlight html %}

<script src='' type='text/javascript'></script>

{% endhighlight %}

I can now share,, and without having to lookup the actual urls.