file2link/.htaccess

43 lines
1.7 KiB
ApacheConf
Raw Normal View History

Options -Indexes +FollowSymLinks -SymLinksIfOwnerMatch
2019-11-18 00:19:13 +00:00
RewriteEngine on
2020-05-01 23:00:35 +00:00
RewriteCond %{REQUEST_URI} jquery-file-upload.html [NC]
RewriteRule .* - [L]
## Sécurité
#RewriteRule ^files/([0-9]+-[0-9]{1,2})/.key-[0-9]{12} /index.php?action=403
RewriteRule ^files/(.+) /index.php?action=403
RewriteRule ^(.+).key-[0-9]{12}$ /index.php?action=403
RewriteRule ^(.+).cfg$ /index.php?action=403
2019-11-18 00:19:13 +00:00
RewriteRule ^config.yaml$ index.php?action=403
RewriteRule ^cron.php$ index.php?action=403
## Font pour lightgallery
RewriteRule ^fonts/(.+)$ lib/fonts/$1 [L]
## Rewrite app
2019-11-18 22:36:13 +00:00
# direct
RewriteRule ^([0-9]+-[0-9]{1,2})/(.+)$ index.php?action=read&id=$1&file=$2 [L]
2019-11-18 22:36:13 +00:00
# html page
RewriteRule ^gallery/([0-9]+-[0-9]{1,2})/ index.php?action=html&id=$1&gallery=1&%{QUERY_STRING} [L]
RewriteRule ^gallery/([0-9]+-[0-9]{1,2}) index.php?action=html&id=$1&gallery=1&%{QUERY_STRING} [L]
RewriteRule ^([0-9]+-[0-9]{1,2})/$ index.php?action=html&id=$1&%{QUERY_STRING} [L]
RewriteRule ^([0-9]+-[0-9]{1,2})$ index.php?action=html&id=$1&%{QUERY_STRING} [L]
2019-11-18 22:36:13 +00:00
# download force
2019-11-18 00:19:13 +00:00
RewriteRule ^dl/([0-9]+-[0-9]{1,2})/(.+)$ index.php?action=dl&id=$1&file=$2 [L]
2019-11-18 22:36:13 +00:00
# delete
2019-11-18 00:19:13 +00:00
RewriteRule ^del/([0-9]+-[0-9]{1,2})/([0-9]{12})/(.+)$ index.php?action=del&id=$1&key=$2&file=$3 [L]
RewriteRule ^del/([0-9]+-[0-9]{1,2})/([0-9]{12})/$ index.php?action=del&id=$1&key=$2 [L]
2019-11-18 22:36:13 +00:00
# zip
2019-11-18 00:19:13 +00:00
RewriteRule ^([0-9]+-[0-9]{1,2})\.zip$ index.php?action=zip&id=$1 [L]
2019-11-18 22:36:13 +00:00
# Mes fichiers
RewriteRule ^My$ index.php?action=myFiles&%{QUERY_STRING} [L]
# Pages
RewriteRule ^(.+)\.html$ index.php?action=page&name=$1&%{QUERY_STRING} [L]
2019-11-18 00:19:13 +00:00
# Error
RewriteRule ^404$ index.php?action=404
RewriteRule ^403$ index.php?action=403
2019-11-18 00:19:13 +00:00
ErrorDocument 404 /index.php?action=404
ErrorDocument 403 /index.php?action=403