<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[htaccess: Sicurizzare e velocizzare Joomla!]]></title><description><![CDATA[<p dir="auto">Ciao,<br />
sto studiando un po' .htaccess per migliorare le prestazioni di joomla! sfruttando le potenzialità dei moduli apache.</p>
<p dir="auto">Questo l'.htaccess modificato che ho installato sul mio sito.<br />
Qualcuno mi sa dare altri consigli per aumentare le performance di Joomla! migliorandolo ? <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/8dfea2c6-baa4-48ad-9022-ab237b734846-fumato5.gif?v=12b9555a9a1" class="not-responsive emoji emoji-customizations emoji--fumato" style="height:1.4em;width:auto;vertical-align:middle" title=":fumato:" alt="" /></p>
<p dir="auto">problemi che non so come risolvere:</p>
<ol>
<li>le gif presenti nel css non vengono compresse</li>
<li>le immagini, i css e js di virtuemart non vengono compressi</li>
</ol>
<h2></h2>
<h1>@version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $</h1>
<h1>@package Joomla</h1>
<h1>@copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.</h1>
<h1>@license xxxxxxxxxxxxxxx</h1>
<h1>Joomla! is Free Software</h1>
<h2></h2>
<p dir="auto">#####################################################</p>
<h1>READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE</h1>
<h1></h1>
<h1>The line just below this section: 'Options +FollowSymLinks' may cause problems</h1>
<h1>with some server configurations. It is required for use of mod_rewrite, but may already</h1>
<h1>be set by your server administrator in a way that dissallows changing it in</h1>
<h1>your .htaccess file. If using it causes your server to error out, comment it out (add # to</h1>
<h1>beginning of line), reload your site in your browser and test your sef url's. If they work,</h1>
<h1>it has been set by your server administrator and you do not need it set here.</h1>
<h1></h1>
<p dir="auto">#####################################################</p>
<h2>Can be commented out if causes errors, see notes above.</h2>
<h3>Options +FollowSymLinks</h3>
<h1></h1>
<h1>mod_rewrite in use</h1>
<p dir="auto">RewriteEngine On</p>
<h4>Start Block Bad bot</h4>
<h1></h1>
<p dir="auto">&lt;Limit GET POST&gt;<br />
order allow,deny<br />
allow from all<br />
Deny from env=bad_bot<br />
&lt;/Limit&gt;</p>
<h1>bad bot list</h1>
<p dir="auto">SetEnvIfNoCase User-Agent "^Black Hole" bad_bot<br />
SetEnvIfNoCase User-Agent "^Titan" bad_bot<br />
SetEnvIfNoCase User-Agent "^WebStripper" bad_bot<br />
SetEnvIfNoCase User-Agent "^NetMechanic" bad_bot<br />
SetEnvIfNoCase User-Agent "^CherryPicker" bad_bot<br />
SetEnvIfNoCase User-Agent "^EmailCollector" bad_bot<br />
SetEnvIfNoCase User-Agent "^EmailSiphon" bad_bot<br />
SetEnvIfNoCase User-Agent "^WebBandit" bad_bot<br />
SetEnvIfNoCase User-Agent "^EmailWolf" bad_bot<br />
SetEnvIfNoCase User-Agent "^ExtractorPro" bad_bot<br />
SetEnvIfNoCase User-Agent "^CopyRightCheck" bad_bot<br />
SetEnvIfNoCase User-Agent "^Crescent" bad_bot<br />
SetEnvIfNoCase User-Agent "^Wget" bad_bot<br />
SetEnvIfNoCase User-Agent "^SiteSnagger" bad_bot<br />
SetEnvIfNoCase User-Agent "^ProWebWalker" bad_bot<br />
SetEnvIfNoCase User-Agent "^CheeseBot" bad_bot<br />
SetEnvIfNoCase User-Agent "^Teleport" bad_bot<br />
SetEnvIfNoCase User-Agent "^TeleportPro" bad_bot<br />
SetEnvIfNoCase User-Agent "^MIIxpc" bad_bot<br />
SetEnvIfNoCase User-Agent "^Telesoft" bad_bot<br />
SetEnvIfNoCase User-Agent "^Website Quester" bad_bot<br />
SetEnvIfNoCase User-Agent "^WebZip" bad_bot<br />
SetEnvIfNoCase User-Agent "^moget/2.1" bad_bot<br />
SetEnvIfNoCase User-Agent "^WebZip/4.0" bad_bot<br />
SetEnvIfNoCase User-Agent "^WebSauger" bad_bot<br />
SetEnvIfNoCase User-Agent "^WebCopier" bad_bot<br />
SetEnvIfNoCase User-Agent "^NetAnts" bad_bot<br />
SetEnvIfNoCase User-Agent "^Mister PiX" bad_bot<br />
SetEnvIfNoCase User-Agent "^WebAuto" bad_bot<br />
SetEnvIfNoCase User-Agent "^TheNomad" bad_bot<br />
SetEnvIfNoCase User-Agent "^WWW-Collector-E" bad_bot<br />
SetEnvIfNoCase User-Agent "^RMA" bad_bot<br />
SetEnvIfNoCase User-Agent "^libWeb/clsHTTP" bad_bot<br />
SetEnvIfNoCase User-Agent "^asterias" bad_bot<br />
SetEnvIfNoCase User-Agent "^httplib" bad_bot<br />
SetEnvIfNoCase User-Agent "^turingos" bad_bot<br />
SetEnvIfNoCase User-Agent "^spanner" bad_bot<br />
SetEnvIfNoCase User-Agent "^InfoNaviRobot" bad_bot<br />
SetEnvIfNoCase User-Agent "^Harvest/1.5" bad_bot<br />
SetEnvIfNoCase User-Agent "^Bullseye/1.0" bad_bot<br />
SetEnvIfNoCase User-Agent "^Mozilla/4.0 (compatible; BullsEye; Windows 95)" bad_bot<br />
SetEnvIfNoCase User-Agent "^Crescent Internet ToolPak HTTP OLE Control v.1.0" bad_bot<br />
SetEnvIfNoCase User-Agent "^CherryPickerSE/1.0" bad_bot<br />
SetEnvIfNoCase User-Agent "^CherryPicker /1.0" bad_bot<br />
SetEnvIfNoCase User-Agent "^WebBandit/3.50" bad_bot<br />
SetEnvIfNoCase User-Agent "^NICErsPRO" bad_bot<br />
SetEnvIfNoCase User-Agent "^Microsoft URL Control - 5.01.4511" bad_bot<br />
SetEnvIfNoCase User-Agent "^DittoSpyder" bad_bot<br />
SetEnvIfNoCase User-Agent "^Foobot" bad_bot<br />
SetEnvIfNoCase User-Agent "^WebmasterWorldForumBot" bad_bot<br />
SetEnvIfNoCase User-Agent "^SpankBot" bad_bot<br />
SetEnvIfNoCase User-Agent "^BotALot" bad_bot<br />
SetEnvIfNoCase User-Agent "^lwp-trivial/1.34" bad_bot<br />
SetEnvIfNoCase User-Agent "^lwp-trivial" bad_bot<br />
SetEnvIfNoCase User-Agent "^Wget/1.6" bad_bot<br />
SetEnvIfNoCase User-Agent "^BunnySlippers" bad_bot<br />
SetEnvIfNoCase User-Agent "^Microsoft URL Control - 6.00.8169" bad_bot<br />
SetEnvIfNoCase User-Agent "^URLy Warning" bad_bot<br />
SetEnvIfNoCase User-Agent "^Wget/1.5.3" bad_bot<br />
SetEnvIfNoCase User-Agent "^LinkWalker" bad_bot<br />
SetEnvIfNoCase User-Agent "^cosmos" bad_bot<br />
SetEnvIfNoCase User-Agent "^moget" bad_bot<br />
SetEnvIfNoCase User-Agent "^hloader" bad_bot<br />
SetEnvIfNoCase User-Agent "^humanlinks" bad_bot<br />
SetEnvIfNoCase User-Agent "^LinkextractorPro" bad_bot<br />
SetEnvIfNoCase User-Agent "^Offline Explorer" bad_bot<br />
SetEnvIfNoCase User-Agent "^Mata Hari" bad_bot<br />
SetEnvIfNoCase User-Agent "^LexiBot" bad_bot<br />
SetEnvIfNoCase User-Agent "^Web Image Collector" bad_bot<br />
SetEnvIfNoCase User-Agent "^The Intraformant" bad_bot<br />
SetEnvIfNoCase User-Agent "^True_Robot/1.0" bad_bot<br />
SetEnvIfNoCase User-Agent "^True_Robot" bad_bot<br />
SetEnvIfNoCase User-Agent "^BlowFish/1.0" bad_bot<br />
SetEnvIfNoCase User-Agent "^JennyBot" bad_bot<br />
SetEnvIfNoCase User-Agent "^MIIxpc/4.2" bad_bot<br />
SetEnvIfNoCase User-Agent "^BuiltBotTough" bad_bot<br />
SetEnvIfNoCase User-Agent "^ProPowerBot/2.14" bad_bot<br />
SetEnvIfNoCase User-Agent "^BackDoorBot/1.0" bad_bot<br />
SetEnvIfNoCase User-Agent "^toCrawl/UrlDispatcher" bad_bot<br />
SetEnvIfNoCase User-Agent "^WebEnhancer" bad_bot<br />
SetEnvIfNoCase User-Agent "^TightTwatBot" bad_bot<br />
SetEnvIfNoCase User-Agent "^suzuran" bad_bot<br />
SetEnvIfNoCase User-Agent "^VCI WebViewer VCI WebViewer Win32" bad_bot<br />
SetEnvIfNoCase User-Agent "^VCI" bad_bot<br />
SetEnvIfNoCase User-Agent "^Szukacz/1.4" bad_bot<br />
SetEnvIfNoCase User-Agent "^QueryN Metasearch" bad_bot<br />
SetEnvIfNoCase User-Agent "^Openfind data gathere" bad_bot<br />
SetEnvIfNoCase User-Agent "^Openfind" bad_bot<br />
SetEnvIfNoCase User-Agent "^Xenu's Link Sleuth 1.1c" bad_bot<br />
SetEnvIfNoCase User-Agent "^Xenu's" bad_bot<br />
SetEnvIfNoCase User-Agent "^Zeus" bad_bot<br />
SetEnvIfNoCase User-Agent "^RepoMonkey Bait &amp; Tackle/v1.01" bad_bot<br />
SetEnvIfNoCase User-Agent "^RepoMonkey" bad_bot<br />
SetEnvIfNoCase User-Agent "^Zeus 32297 Webster Pro V2.9 Win32" bad_bot<br />
SetEnvIfNoCase User-Agent "^Webster Pro" bad_bot<br />
SetEnvIfNoCase User-Agent "^EroCrawler" bad_bot<br />
SetEnvIfNoCase User-Agent "^LinkScan/8.1a Unix" bad_bot<br />
SetEnvIfNoCase User-Agent "^Keyword Density/0.9" bad_bot<br />
SetEnvIfNoCase User-Agent "^Kenjin Spider" bad_bot<br />
SetEnvIfNoCase User-Agent "^Cegbfeieh" bad_bot</p>
<h1></h1>
<h4>End Block Bad bot</h4>
<p dir="auto">########## Begin - Rewrite rules to block out some common exploits</p>
<h2>If you experience problems on your site block out the operations listed below</h2>
<h2>This attempts to block the most common type of exploit <code>attempts</code> to Joomla!</h2>
<h1></h1>
<h1>Block out any script trying to set a mosConfig value through the URL</h1>
<p dir="auto">RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [OR]</p>
<h1>Block out any script trying to base64_encode crap to send via URL</h1>
<p dir="auto">RewriteCond %{QUERY_STRING} base64_encode.<em>(.</em>) [OR]</p>
<h1>Block out any script that includes a &lt;script&gt; tag in URL</h1>
<p dir="auto">RewriteCond %{QUERY_STRING} (&lt;|%3C).<em>script.</em>(&gt;|%3E) [NC,OR]</p>
<h1>Block out any script trying to set a PHP GLOBALS variable via URL</h1>
<p dir="auto">RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]</p>
<h1>Block out any script trying to modify a _REQUEST variable via URL</h1>
<p dir="auto">RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})</p>
<h1>Send all blocked request to homepage with 403 Forbidden error!</h1>
<p dir="auto">RewriteRule ^(.*)$ index.php [F,L]</p>
<h1></h1>
<p dir="auto">########## End - Rewrite rules to block out some common exploits</p>
<h1>Uncomment following line if your webserver's URL</h1>
<h1>is not directly related to physical file paths.</h1>
<h1>Update Your Joomla! Directory (just / for root)</h1>
<p dir="auto"><a href="/hashtags/rewritebase">#RewriteBase</a> /</p>
<p dir="auto">########## Begin - Joomla! core SEF Section</p>
<h1></h1>
<p dir="auto">RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteCond %{REQUEST_URI} !^/index.php<br />
RewriteCond %{REQUEST_URI} (/|.php|.html|.htm|.feed|.pdf|.raw|/[^.]<em>)$ [NC]<br />
RewriteRule (.</em>) index.php<br />
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]</p>
<h1></h1>
<p dir="auto">########## End - Joomla! core SEF Section</p>
<p dir="auto">&lt;IfModule mod_deflate.c&gt;<br />
&lt;FilesMatch ".(js|css)$"&gt;<br />
SetOutputFilter DEFLATE<br />
&lt;/FilesMatch&gt;<br />
&lt;/IfModule&gt;</p>
<p dir="auto">########## Begin - compress section</p>
<h1></h1>
<p dir="auto">SetOutputFilter DEFLATE<br />
AddOutputFilter DEFLATE text/plain<br />
AddOutputFilter DEFLATE text/html<br />
AddOutputFilter DEFLATE text/xml<br />
AddOutputFilter DEFLATE text/css<br />
AddOutputFilter DEFLATE application/xml<br />
AddOutputFilter DEFLATE application/xhtml+xml<br />
AddOutputFilter DEFLATE application/rss+xml<br />
AddOutputFilter DEFLATE application/javascript<br />
AddOutputFilter DEFLATE application/x-javascript<br />
AddOutputFilter DEFLATE application/x-httpd-php<br />
AddOutputFilter DEFLATE application/x-httpd-fastphp<br />
AddOutputFilter DEFLATE image/svg+xml<br />
BrowserMatch ^Mozilla/4 gzip-only-text/html<br />
BrowserMatch ^Mozilla/4.0[678] no-gzip<br />
BrowserMatch bMSIE !no-gzip !gzip-only-text/html<br />
SetEnvIf User-Agent ".<em>MSIE.</em>" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0</p>
<h1>Don't compress images</h1>
<p dir="auto">SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary</p>
<h1></h1>
<p dir="auto">########## end - compress section</p>
<p dir="auto">########### Start Prevenire Image Hot Linking</p>
<h1></h1>
<p dir="auto">RewriteCond %{REQUEST_FILENAME} .(gif|jpe?g|png)$ [NC]<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !tuosito.it [NC] <a href="/hashtags/inserisci">#inserisci</a> il tuo sito !!<br />
RewriteCond %{HTTP_REFERER} !<a href="http://bloglines.com" rel="nofollow ugc">bloglines.com</a> [NC]<br />
RewriteCond %{HTTP_REFERER} !google. [NC]<br />
RewriteCond %{HTTP_REFERER} !yahoo. [NC]<br />
RewriteCond %{HTTP_REFERER} !search?q=cache [NC]<br />
RewriteRule (.*) h t t p : / / 127.0.0.1 [R,NC,L]</p>
<h1>Settare gli Expires headers e cache control</h1>
<p dir="auto">&lt;IfModule mod_expires.c&gt;<br />
ExpiresActive On<br />
ExpiresDefault A600<br />
ExpiresByType image/x-icon A2592000<br />
ExpiresByType application/x-javascript A604800<br />
ExpiresByType text/css A604800<br />
ExpiresByType image/gif A2592000<br />
ExpiresByType image/png A2592000<br />
ExpiresByType image/x-icon A2592000<br />
ExpiresByType image/jpeg A2592000<br />
ExpiresByType image/jpg A2592000<br />
ExpiresByType image/jpeg A2592000<br />
ExpiresByType text/plain A86400<br />
ExpiresByType application/x-shockwave-flash A2592000<br />
ExpiresByType video/x-flv A2592000<br />
ExpiresByType application/pdf A2592000<br />
ExpiresByType text/html A600</p>
<h3>HEADER CACHING</h3>
<p dir="auto">&lt;filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"&gt;<br />
Header set Cache-Control "max-age=2592000, public"<br />
Header unset Last-Modified<br />
&lt;/filesMatch&gt;<br />
&lt;filesMatch "\.(css)$"&gt;<br />
Header set Cache-Control "max-age=604800, public"<br />
Header unset Last-Modified<br />
&lt;/filesMatch&gt;<br />
&lt;filesMatch "\.(js)$"&gt;<br />
Header set Cache-Control "max-age=216000, private"<br />
Header unset Last-Modified<br />
&lt;/filesMatch&gt;<br />
&lt;filesMatch "\.(xml|txt)$"&gt;<br />
Header set Cache-Control "max-age=216000, public, must-revalidate"<br />
&lt;/filesMatch&gt;<br />
&lt;filesMatch "\.(html|htm|php)$"&gt;<br />
Header set Cache-Control "max-age=1, private, must-revalidate"<br />
&lt;/filesMatch&gt;</p>
<h1>Disattivare ETags</h1>
<p dir="auto">Header unset ETag<br />
&lt;/IfModule&gt;</p>
<h1>Disattivare gli ETags</h1>
<p dir="auto">FileETag none</p>
<h1></h1>
<p dir="auto">########### end Prevenire Image Hot Linking</p>
]]></description><link>https://dev.connect.gt/topic/129280/htaccess-sicurizzare-e-velocizzare-joomla</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 01:27:05 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/129280.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 11 Jun 2010 13:18:49 GMT</pubDate><ttl>60</ttl></channel></rss>