Created
July 22, 2016 00:37
-
-
Save frostbitten/980f8719a90b38a7eb5002a186cb6260 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$app->get('/css/fonts/fontawesome-(:type)?', function ($type) use ($app) { | |
$v = $app->request->get()['v']; | |
$app->redirect('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/'.$v.'/fonts/fontawesome-'.$type, 301); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this works because fontawesome declares this route (including the version number in the query parameters) for font files.
See here:
This might not work in one case
but I'm really not sure:
url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'),
See the
#
mark?