Forum Moderators: open
much funnier than xtglobal
adding more stickysNoooo! I know one forum that has so many stickys-- some of them dating back as much as 10 years-- that they completely fill the first screen, and established users immediately learn to ignore stickies categorically.
Not everyone runs on Linux so using tools like .htaccess isn't even an option for manyI kinda think what your fingers typed isn't what your brain intended, but I'm not sure what the intention was :( Surely every type of server offers some type of access control on the directory level?
.
htaccess is an Apache component and it's found most commonly on boxes running Linux. My point really was that folks running on a Windows server (for example) don't use this much if at all.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" />
</staticContent>
</system.webServer>
</configuration>
#referrer spam
RewriteCond %{HTTP_REFERER} (pizza|burger|button|for-your-|semalt|seo|--production|x00_|s-anal|responsive)
RewriteRule .* - [F]
#RewriteMap file example for blocking individual IPs
#123.123.123.123 123.123.123.123
RewriteMap blockedips txt:anothersubfolder/blockedips.txt
RewriteCond %{REMOTE_ADDR} (.*)
RewriteCond ${blockedips:%1|NOT_FOUND} !NOT_FOUND
RewriteRule .? - [F]
# Firefox/6.0.2 ? from Japan/NTT IP Ranges
RewriteCond %{REMOTE_ADDR} ^210\.163\.39. [OR]
RewriteCond %{REMOTE_ADDR} ^210\.232\.15. [OR]
RewriteCond %{REMOTE_ADDR} ^211\.0\.145. [OR]
RewriteCond %{REMOTE_ADDR} ^211\.123\.206. [OR]
RewriteCond %{REMOTE_ADDR} ^211\.123\.208. [OR]
RewriteCond %{REMOTE_ADDR} ^211\.6\.121. [OR]
RewriteCond %{REMOTE_ADDR} ^210\.163\.39. [OR]
RewriteCond %{REMOTE_ADDR} ^210\.232\.15. [OR]
RewriteCond %{REMOTE_ADDR} ^211\.0\.154.
RewriteRule .* - [F]
#Block bots that identify themselves and I don't want deal with
RewriteCond %{HTTP:User-Agent} (?:CFNetwork|MSIE8|masscan|SeznamBot|NetSeer|proximic|QippoBot|Advisorbot|coccoc|oBot|Comodo-Certificates|Synapse|MLBot|ShopSalad|aihit|Yeti|cuil|Purebot|sai-crawler|LinkCheck|Tasapspider|80legs|java|Made|Toata|ichiro|someone|baidu|yanga|sogou|voila|YoudaoBot|GingerCrawler|copyright|zhewang|QACC|Netcraft) [NC]
RewriteRule .? - [F]
#extra file extensions trap(remove asp and aspx if your app uses them )
RewriteCond %{REQUEST_URI} (.*).asp|php|html|aspx$ [NC]
RewriteRule .? - [F]
# or RewriteRule .? /trap/trap.cfm [L]
# note that trap subdirectory is a separate folder and a separate APP, that modifies anothersubfolder/blockedips.txt file so as soon as it is determined the IP gets written to a file and any subsequent requests get blocked by RewriteMap file example example. Both trap and anothersubfolder are sitting in my WWW folder.
....etc, etc....
# .htaccess main domain to subdirectory rewrite
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.tld$ [NC]
RewriteRule !^subdirectory/ /subdirectory%{REQUEST_URI} [L,NC]