Route to an asset (PDF)

edited July 2014 in Share
I have a route set up to go from a simple url to a PDF:

$route['altaimpact'] = 'assets/images/altabicycleshare/altaimpact.pdf';

It works just fine on my localhost but shows a 404 on our dev server. Any idea why this might be happening?

Comments

  • edited 3:55AM
    If you are wanting to point to an asset like that through a route, you would need to create an "asset" controller perhaps that uses the _remap method to route asset files through. A route must have a controller to map to. FUEL uses the 404_override route to first check for any view files that match the URI path to serve up but uses the fuel/page_router controller to do so. So in short, I would expect it to 404. You could create a redirect in the fuel/application/config/redirects.php file that redirects to that file.
  • edited 3:55AM
    Ok, that should be fine for this small project. Thanks!
Sign In or Register to comment.