I want to only allow the priviledged user to download some special file.
So I config apache2 with below, which make /data/model/userModel
cannot directly accessable.
Alias /user_model "/data/model/userModel"
<Directory /data/model/userModel>
Order allow,deny
Deny from all
</Directory>
While the /data/model/userModel
may have subfolders, like
/data/model/userModel/pic/tiny/aaa.png
/data/model/userModel/txt/aaa.txt
/data/model/userModel/model/0/13/aaa.zip
This path is just for file download, in the controller method I just check if the user have to right to download file. So I try to use only one route for these pathes. For example,
Route::get('user_model/*', 'ModelController@user_model');
While it not works. The *
in the route only can match one segment of the url.
How can I make one route match url with scalable segments length. I don't know my design of the route here is proper.