# BEGIN WpFastestCache
# Modified Time: 10-09-26 11:30:49
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.localhost:10003 [NC]
RewriteRule ^(.*)$ http\:\/\/localhost\:10003\/$1 [R=301,L]
# Start WPFC Exclude
# End WPFC Exclude
# Start_WPFC_Exclude_Admin_Cookie
RewriteCond %{HTTP:Cookie} !wordpress_logged_in_[^\=]+\=15034417|Admin_Prolines|AdminAmeer|adminsgs|alanoud|Eman|hatem|ITAdminAbdullah|ITAdminIsraa|mahmoud|sgsadmin|shamael
# End_WPFC_Exclude_Admin_Cookie
RewriteCond %{HTTP_HOST} ^localhost:10003
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 %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !(\/){2,}
RewriteCond %{THE_REQUEST} !(\/){2,}
RewriteCond %{REQUEST_URI} \/$
RewriteCond %{QUERY_STRING} !.+ [OR]
RewriteCond %{QUERY_STRING} fbclid=
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 /Users/hardikshiroya/Documents/GitHub/prolines/sgswebsite/app/public/wp-content/cache/all/$1/index.html -f
RewriteRule ^(.*) "/wp-content/cache/all/$1/index.html" [L]
</IfModule>
<FilesMatch "index\.(html|htm)$">
AddDefaultCharset UTF-8
<ifModule mod_headers.c>
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"
</ifModule>
</FilesMatch>
# END WpFastestCache

# BEGIN SGS hardening
# Block the static core files that fingerprint the WordPress version. PHP never sees
# requests for these, so they cannot be handled by a plugin. Both are restored by every
# core update, which is why this is a server rule rather than a one-off deletion.
# Kept outside the BEGIN/END WordPress markers so WordPress will not overwrite it.
<FilesMatch "^(readme\.html|license\.txt|wp-config-sample\.php)$">
	<IfModule mod_authz_core.c>
		Require all denied
	</IfModule>
	<IfModule !mod_authz_core.c>
		Order allow,deny
		Deny from all
	</IfModule>
</FilesMatch>

# No directory listings. /wp-content/ and /wp-content/plugins/ were both browsable,
# which hands an attacker the exact plugin inventory to match against CVE lists.
Options -Indexes

# Archives, database dumps and logs must never be served. UpdraftPlus wrote 2.5 GB of
# backups (including a full DB dump with every password hash and the SMTP/API keys in
# wp_options) into wp-content/updraft/ and "protected" them with a .htaccess containing
# "deny from all" — which does nothing on this stack, because production is nginx.
# The backups now live outside the webroot; this is the second line of defence.
<FilesMatch "\.(zip|gz|tar|tgz|bz2|7z|rar|sql|sqlite|db|bak|old|orig|save|swp|log|ini|env)$">
	<IfModule mod_authz_core.c>
		Require all denied
	</IfModule>
	<IfModule !mod_authz_core.c>
		Order allow,deny
		Deny from all
	</IfModule>
</FilesMatch>

# Belt and braces: refuse anything under the backup directory outright.
RedirectMatch 404 ^/wp-content/updraft/

# Block direct execution of PHP inside upload/cache paths. Nothing legitimate runs PHP
# from here, and it is the standard landing zone for an uploaded webshell.
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteRule ^wp-content/uploads/.*\.(php|phtml|php[3-8])$ - [F,L]
	RewriteRule ^wp-content/cache/.*\.(php|phtml|php[3-8])$ - [F,L]
</IfModule>
# END SGS hardening

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
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]
</IfModule>

# END WordPress
# BEGIN Hotlinking
# The directives (lines) between "BEGIN Hotlinking" and "END Hotlinking" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.

# END Hotlinking