# Apply these rules specifically to the xmlrpc.php file # Define the order of access rules: deny first, then allow Order Deny,Allow # Deny all external access to the file Deny from all # BEGIN WpFastestCache # Modified Time: 29-10-24 15:19:31 RewriteEngine On RewriteBase / #RewriteCond %{HTTPS} =on #RewriteCond %{HTTP_HOST} ^aiacademy.tw # Start WPFC Exclude RewriteCond %{REQUEST_URI} !^/alumn [NC] # End WPFC Exclude # Start_WPFC_Exclude_Admin_Cookie RewriteCond %{HTTP:Cookie} !wordpress_logged_in_[^\=]+\=ben|cshuai|vansindata # End_WPFC_Exclude_Admin_Cookie RewriteCond %{HTTP_HOST} ^aiacademy.tw RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit|WP_FASTEST_CACHE_CSS_VALIDATOR|Twitterbot|LinkedInBot|WhatsApp|Mediatoolkitbot) RewriteCond %{HTTP_USER_AGENT} !(WP\sFastest\sCache\sPreload(\siPhone\sMobile)?\s*Bot) RewriteCond %{REQUEST_METHOD} !POST RewriteCond %{REQUEST_URI} !(\/){2,} RewriteCond %{THE_REQUEST} !(\/){2,} RewriteCond %{REQUEST_URI} \/$ RewriteCond %{QUERY_STRING} !.+ RewriteCond %{HTTP:Cookie} !wordpress_logged_in RewriteCond %{HTTP:Cookie} !comment_author_ RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC] RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/all/$1/index.html -f [or] RewriteCond /data/www/aiacademy_tw/wp-content/cache/all/$1/index.html -f RewriteRule ^(.*) "/wp-content/cache/all/$1/index.html" [L] AddDefaultCharset UTF-8 FileETag None Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires "Mon, 29 Oct 1923 20:30:00 GMT" # END WpFastestCache # BEGIN GzipWpFastestCache AddType x-font/woff .woff AddType x-font/ttf .ttf AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE x-font/ttf AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE font/opentype font/ttf font/eot font/otf # END GzipWpFastestCache # BEGIN LBCWpFastestCache AddType application/font-woff2 .woff2 AddType application/x-font-opentype .otf ExpiresActive On ExpiresDefault A0 ExpiresByType video/webm A10368000 ExpiresByType video/ogg A10368000 ExpiresByType video/mp4 A10368000 ExpiresByType image/avif A10368000 ExpiresByType image/webp A10368000 ExpiresByType image/gif A10368000 ExpiresByType image/png A10368000 ExpiresByType image/jpg A10368000 ExpiresByType image/jpeg A10368000 ExpiresByType image/ico A10368000 ExpiresByType image/svg+xml A10368000 ExpiresByType text/css A10368000 ExpiresByType text/javascript A10368000 ExpiresByType application/javascript A10368000 ExpiresByType application/x-javascript A10368000 ExpiresByType application/font-woff2 A10368000 ExpiresByType application/x-font-opentype A10368000 ExpiresByType application/x-font-truetype A10368000 Header set Expires "max-age=A10368000, public" Header unset ETag Header set Connection keep-alive FileETag None # END LBCWpFastestCache deny from 216.244.66.234 deny from 170.187.198.59 deny from 52.233.106.198 deny from 202.182.121.215 #deny from 149.28.16.132 deny from 185.191.171.1 - 185.191.171.100 deny from 114.119.139.1 - 114.119.139.202 deny from 216.244.66.234 deny from 17.241.227.237 deny from 87.120.126.235 RedirectMatch 404 \.git RedirectMatch 404 \.gitignore RedirectMatch 404 package-lock.json RedirectMatch 404 package.json RedirectMatch 404 wp-config.bk.php Redirect 301 /ai-in-taiwan/ /event/ai-in-taiwan/ Redirect 301 /python-202007/ /admission-python-202007/ Redirect 301 /machine-learning-202008/ /admission-ml-202008/ Redirect 301 /dl-202009/ /admission-dl-202009/ Redirect 301 /cnn-202010/ /admission-cnn-202010/ # we need allow /wp-json for /liberal/ website. RedirectMatch 404 \/wp-json RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # BEGIN WordPress # 在含有 BEGIN WordPress 及 END WordPress 標記的這兩行間的指示詞內容為動態產生, # 且應僅有 WordPress 篩選器能進行修改。對這兩行間任何指示詞內容的變更, # 都會遭到系統覆寫。 RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress