17 lines
467 B
ApacheConf
17 lines
467 B
ApacheConf
Options -Indexes
|
|
RewriteEngine On
|
|
|
|
# Allow only bot IP
|
|
RewriteCond %{REMOTE_ADDR} !^90\.188\.48\.201$
|
|
RewriteRule ^ - [F,L]
|
|
|
|
# Nice URLs: /rss/gremtelegram -> rss.php?channel=gremtelegram
|
|
RewriteRule ^rss/([a-zA-Z0-9_]+)$ rss.php?channel=$1 [L,QSA]
|
|
|
|
# Block direct access to cache directory
|
|
RewriteRule ^cache/ - [F,L]
|
|
|
|
# Cache images for 7 days
|
|
<FilesMatch "\.(jpg|jpeg|png|gif|webp)$">
|
|
Header set Cache-Control "public, max-age=604800, immutable"
|
|
</FilesMatch>
|