You would have a redirector page like:
redirector/http://externalurl.com/
And then in the controller you either have an array of codes and the URLs they redirect to or use the external URL in the local one as per above.
function redirect($url) {
return Redirect::to($url);
}
Hey beaverusiv,
Now I have arrived at an outcome that I was almost certain would unfold. I followed your sound advice and constructed the following route:
Route::get('/acm/{slug}', function( $slug ) {
$publication = Publication::whereSlug($slug)->first();
return Redirect::to($publication->download_link);
});
The intent of this is of course other pages linking to that 'redirecting' route. Unfortunately, this doesn't work. I arrive at the correct page on ACM's website, but their 'non authorized link detection code' apparently triggers as I am not allowed to download the article.
However - if I instead do this:
Route::get('/acm/{slug}', function( $slug ) {
$publication = Publication::whereSlug($slug)->first();
return '<a href="'. $publication->download_link .'">LINK TO PDF</a>';
});
Then clicking that link will work.
I'm generally not the type to circumvent protocol, but this is just silly. Any ideas for how I might bypass their silly detection schemes?
Regards, Gazoo
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community