From: Vincent Vanwaelscappel Date: Thu, 18 Apr 2024 14:22:38 +0000 (+0200) Subject: wip #6871 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=db56490a2225b3c889efd1b048217a78fe770778;p=bastide-resah.git wip #6871 @1 --- diff --git a/app/Http/Controllers/CatalogController.php b/app/Http/Controllers/CatalogController.php new file mode 100644 index 0000000..8f25bde --- /dev/null +++ b/app/Http/Controllers/CatalogController.php @@ -0,0 +1,21 @@ +guest() ? 'fluidbooks/catalogue_invite' : 'fluidbooks/catalogue'; + + $relayPath = base_path($cpath) . '/' . $path; + return XSendFileController::sendfile($relayPath); + } +} diff --git a/public/.htaccess b/public/.htaccess index 3aec5e2..c65d98c 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -9,10 +9,10 @@ RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] - # Redirect Trailing Slashes If Not A Folder... - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_URI} (.+)/$ - RewriteRule ^ %1 [L,R=301] +# # Redirect Trailing Slashes If Not A Folder... +# RewriteCond %{REQUEST_FILENAME} !-d +# RewriteCond %{REQUEST_URI} (.+)/$ +# RewriteRule ^ %1 [L,R=301] # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d diff --git a/routes/web.php b/routes/web.php index d259f33..a420db0 100644 --- a/routes/web.php +++ b/routes/web.php @@ -2,17 +2,4 @@ use Illuminate\Support\Facades\Route; -/* -|-------------------------------------------------------------------------- -| Web Routes -|-------------------------------------------------------------------------- -| -| Here is where you can register web routes for your application. These -| routes are loaded by the RouteServiceProvider and all of them will -| be assigned to the "web" middleware group. Make something great! -| -*/ - -Route::get('/', function () { - return view('welcome'); -}); +Route::get('/catalogue/{path?}', \App\Http\Controllers\CatalogController::class . '@index')->where('path', '.*');