add case insentive and force download support
This commit is contained in:
@@ -3,6 +3,14 @@
|
||||
Options -MultiViews -Indexes
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
<FilesMatch "\.(?i:pdf|doc|docx|zip|txt|mp4)$">
|
||||
<If "%{QUERY_STRING} =~ /(^|&)download=1($|&)/">
|
||||
Header set Content-Disposition "attachment"
|
||||
</If>
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Add www subdomain if missing
|
||||
@@ -21,7 +29,7 @@
|
||||
# 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]
|
||||
RewriteRule ^uploads/(.+)\.(jpe?g|png)$ media.php?url=uploads/$1.$2 [NC,QSA,L]
|
||||
|
||||
# Send Requests To Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
|
||||
Reference in New Issue
Block a user