43 lines
1.7 KiB
ApacheConf
43 lines
1.7 KiB
ApacheConf
Options -Indexes +FollowSymLinks -SymLinksIfOwnerMatch
|
|
|
|
RewriteEngine on
|
|
|
|
|
|
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
|
|
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
|
|
# direct
|
|
RewriteRule ^([0-9]+-[0-9]{1,2})/(.+)$ index.php?action=read&id=$1&file=$2 [L]
|
|
# 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]
|
|
# download force
|
|
RewriteRule ^dl/([0-9]+-[0-9]{1,2})/(.+)$ index.php?action=dl&id=$1&file=$2 [L]
|
|
# delete
|
|
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]
|
|
# zip
|
|
RewriteRule ^([0-9]+-[0-9]{1,2})\.zip$ index.php?action=zip&id=$1 [L]
|
|
# Mes fichiers
|
|
RewriteRule ^My$ index.php?action=myFiles&%{QUERY_STRING} [L]
|
|
# Pages
|
|
RewriteRule ^(.+)\.html$ index.php?action=page&name=$1&%{QUERY_STRING} [L]
|
|
# Error
|
|
RewriteRule ^404$ index.php?action=404
|
|
RewriteRule ^403$ index.php?action=403
|
|
ErrorDocument 404 /index.php?action=404
|
|
ErrorDocument 403 /index.php?action=403
|