Support the ongoing development of Laravel.io →
posted 11 years ago
Requests Input

Here's is my case.

Let's assume I have web page foo.com. If user already logged in, I need to grab every request for foo.com/http://bar.com and make some proccesing with it. So basicly, user will put my domain name into the current url and press enter, then I'll make some magic.

If you have something for me, don't have read more. I'm good at php, so probably your solution will be good. My requests treated as folder access, or all routes went to my magic. Do you think best solution for this, checking every route and if they are starting with http putting to my magic. But user may send me url without starting http.

Last updated 3 years ago.
0

I found a solution, but only problem is about this, server treats as this is a directory.

Route::get('{url}', function($url)
{
    return $url;
})
->where('url', '^https?://');
Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

cwofa cwofa Joined 22 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.