xml
<"1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="URL_TO_ALLOW"/> <add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS"/> <add name="Access-Control-Allow-Headers" value="Content-Type"/> </customHeaders> </httpProtocol> </system.webServer> </configuration>
forceHTTPS
<"1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Force HTTPS" stopProcessing="true"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> <add input="{REQUEST_URI}" negate="true" pattern="/ADD_PATTERM_TO_EXCLUDE_FILES_OR_FOLDERS/" ignoreCase="true" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
browserCaching
# Enables browser caching <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 2 days" </IfModule>
customErrorPages
# Sets up custom error pages for 4xx and 5xx errors
ErrorDocument 403 /custom-403.html
ErrorDocument 404 /custom-404.html
forceHTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
# [NC] is a case-insensitive match
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
preventAccessToConfigFiles
# Denies access to all .htaccess files
<Files ~ "^.*\.([Hh][Tt][Aa])">
Order Allow,Deny
Deny from all
Satisfy all
</Files>
urlRewrite
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
好了这篇文章就介绍到这了,需要的朋友可以学习一下。
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
更新日志
- 群星《红色经典》限量1:1母盘直刻[低速原抓WAV+CUE]
- 苗子杰.1993-SUN.SHINE【歌林】【WAV+CUE】
- 吕方.1990-不舍得你【华纳】【WAV+CUE】
- 刘若英.2005-一整夜【大熊星】【WAV+CUE】
- 刘锐/王星《牧者影视配乐精选·贰》[FLAC/分轨][271.13MB]
- 林一峰《作业》[320K/MP3][185.25MB]
- 林一峰《作业》[FLAC/分轨][511.47MB]
- 魔兽世界永久60级奶骑天赋怎么点 永久60级奶骑天赋推荐
- 魔兽世界永久60级矮人牧师怎么玩 永久60级矮人牧师玩法指南
- 炉石传说40血卡组代码一览 2024最新全职业40血卡组代码大全
- 《如龙:极》NS实体版确认!35美元 25年3月发货
- 日本离谱忍者游戏将登NS:手柄插进屁股进行对决
- 《神之天平外传》NS版今日发售 可独立于本体运行
- 群星《24K德国HD金碟红色经典》2CD[WAV+CUE]
- 妙音唱片群星《红色经典DSD1-2》2CD[低速原抓WAV+CUE]