gpt4 book ai didi

apache - .htaccess 模板

转载 作者:行者123 更新时间:2023-12-01 04:18:28 26 4
gpt4 key购买 nike

我做了一个 .htaccess 模板;还有什么应该添加或更改的吗?

# DEFAULTS
ServerSignature Off
AddDefaultCharset UTF-8
DefaultLanguage en-US
SetEnv Europe/Belgrade
SetEnv SERVER_ADMIN chrisp@dejan.com.au

# Rewrites
RewriteEngine On
RewriteBase /

# Redirect to WWW
RewriteCond %{HTTP_HOST} ^serpentineseo.com
RewriteRule (.*) http://www.serpentineseo.com/$1 [R=301,L]

# Cache media files
<filesMatch "\.(gif|jpg|jpeg|png|ico|swf|js)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>

<FilesMatch "\.(js|css|pdf|swf)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>

<FilesMatch "\.(html|htm|txt)$">
Header set Cache-Control "max-age=600"
</FilesMatch>

# DONT CACHE
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
</FilesMatch>

# Deny access to .htaccess
<Files .htaccess>
order allow,deny
deny from all
</Files>

最佳答案

关闭 ETag [1]

FileETag None

ServerTokens Prod,ServerSignature 关闭 [2]
ServerTokens prod
ServerSignature Off

[1]: http://www.askapache.com/htaccess/apache-speed-etags.html关闭 ETag

[2]: http://www.petefreitag.com/item/419.cfm ServerTokens Prod,ServerSignature 关闭

关于apache - .htaccess 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2747351/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com