2016-07-19 00:39:37 +08:00
|
|
|
Options -Indexes
|
|
|
|
|
2018-09-20 22:05:15 +08:00
|
|
|
php_value session.save_path /var/lib/php/uoj_sessions
|
2016-07-19 00:39:37 +08:00
|
|
|
php_value session.gc_maxlifetime 172800
|
2023-01-30 11:53:02 +08:00
|
|
|
php_value session.cookie_lifetime 604800
|
2016-07-19 00:39:37 +08:00
|
|
|
|
2023-01-30 11:53:02 +08:00
|
|
|
php_value post_max_size 1024M
|
|
|
|
php_value upload_max_filesize 1024M
|
2016-07-19 00:39:37 +08:00
|
|
|
|
|
|
|
php_value session.gc_probability 1
|
|
|
|
php_value session.gc_divisor 1000
|
|
|
|
|
2018-10-11 23:36:26 +08:00
|
|
|
php_value date.timezone 'Asia/Shanghai'
|
|
|
|
|
2016-07-19 00:39:37 +08:00
|
|
|
DirectorySlash Off
|
|
|
|
|
|
|
|
DirectoryIndex
|
|
|
|
|
2023-01-30 15:19:39 +08:00
|
|
|
<filesMatch "\.(ico|gif|jpg|png)$">
|
|
|
|
ExpiresActive On
|
|
|
|
ExpiresDefault "access plus 6 month"
|
|
|
|
Header append Cache-Control "public"
|
|
|
|
</filesMatch>
|
|
|
|
|
|
|
|
<filesMatch "\.(css|js)$">
|
|
|
|
ExpiresActive On
|
|
|
|
ExpiresDefault "access plus 1 week"
|
|
|
|
Header append Cache-Control "public"
|
|
|
|
</filesMatch>
|
|
|
|
|
2023-01-30 18:47:44 +08:00
|
|
|
<filesMatch "\.(pdf)$">
|
|
|
|
ExpiresActive On
|
|
|
|
ExpiresDefault "access plus 1 month"
|
|
|
|
Header append Cache-Control "public"
|
|
|
|
</filesMatch>
|
|
|
|
|
2023-01-30 15:19:39 +08:00
|
|
|
RequestHeader append X-Author "Baoshuo ( https://baoshuo.ren )"
|
|
|
|
|
2016-07-19 00:39:37 +08:00
|
|
|
RewriteEngine On
|
|
|
|
|
|
|
|
RewriteCond %{QUERY_STRING} ^$
|
|
|
|
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
|
|
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteRule ^ index.php [L]
|