婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > web.config(IIS)和.htaccess(Apache)配置

web.config(IIS)和.htaccess(Apache)配置

熱門標簽:北海市地圖標注app 湖北ai智能電銷機器人 AI電銷機器人 源碼 新科美甲店地圖標注 外呼系統打哪顯哪 新邵電銷機器人企業 蘭州ai電銷機器人招商 高德地圖標注論壇 江西外呼系統

xml

<?xml version="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

<?xml version="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]

好了這篇文章就介紹到這了,需要的朋友可以學習一下。

標簽:池州 南陽 大理 黔東 自貢 阿克蘇 黃石 海南

巨人網絡通訊聲明:本文標題《web.config(IIS)和.htaccess(Apache)配置》,本文關鍵詞  web.config,IIS,和,.htaccess,Apache,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《web.config(IIS)和.htaccess(Apache)配置》相關的同類信息!
  • 本頁收集關于web.config(IIS)和.htaccess(Apache)配置的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 城步| 永德县| 依安县| 陆良县| 阜南县| 类乌齐县| 天津市| 洮南市| 遂宁市| 驻马店市| 霍州市| 屯留县| 城市| 文登市| 临城县| 横峰县| 东明县| 靖宇县| 文山县| 拉萨市| 宁海县| 会东县| 大足县| 林西县| 凤庆县| 泰兴市| 元朗区| 华容县| 松滋市| 青田县| 青州市| 大洼县| 塔河县| 莒南县| 涪陵区| 宜春市| 乐亭县| 通州市| 东安县| 托克逊县| 堆龙德庆县|