diff --git a/public/.htaccess b/public/.htaccess index 2522f5c..c1dbe5c 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -18,6 +18,11 @@ RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] + # Pass to media handler if the media request has query + RewriteCond %{REQUEST_FILENAME} -f + RewriteCond %{QUERY_STRING} . + RewriteRule ^uploads/(.+)\.(jpg|png)$ media.php?url=uploads/$1.$2 [QSA,L] + # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f diff --git a/public/media.php b/public/media.php new file mode 100644 index 0000000..9c10c91 --- /dev/null +++ b/public/media.php @@ -0,0 +1,52 @@ +