<?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[Non funzionano link interni con mod_rewrite]]></title><description><![CDATA[<p dir="auto">Buongiorno,<br />
dopo aver creato il backup del mio sito con il plugin akeeba, l'ho reinstallato utilizzando kickstart su un nuovo server.</p>
<p dir="auto">Questo sono le caratteristiche:</p>
<p dir="auto">versione joomla 1.5.14<br />
PHP Version   5.2.10<br />
mod_rewrite installed   OK<br />
.htaccess File   OK<br />
Mysql 5.0.77<br />
Acesef Installed Version : 1.5.10</p>
<p dir="auto">Sono attivi:<br />
il mod_rewrite, acesef , friendly URL per i motori di ricerca.<br />
Ho  rinominato l'.htaccess ( htaccess.txt -&gt; .htaccess) e ho controllato  che nel file configuartion.php la variabile "var $live_site = '.......';" fosse configurata correttamente.</p>
<p dir="auto">La home page del sito viene caricata correttamente.<br />
Le voci del menù sono formate da link interni.<br />
Ad esempio:<br />
se clicco sulla voce 'Prodotti' la URL corrispondente è<br />
<a href="http://miosito.it/prodotti" rel="nofollow ugc">miosito.it/prodotti</a></p>
<p dir="auto">La URL <a href="http://miosito.it/prodotti" rel="nofollow ugc">miosito.it/prodotti</a> non corrisponde ad una cartella/file presente sul server ma è il risultato della riscrittura con Acesef.</p>
<p dir="auto">Dopo lo spostamento del sito i link interni sono corretti come URL<br />
(<a href="http://miosito.it/prodotti" rel="nofollow ugc">miosito.it/prodotti</a>) ma restituiscono errore 404.</p>
<p dir="auto">Togliendo  il mod_rewrite e  friendly URL per i motori di ricerca i link  restituiscono la pagina corretta ma naturalmente la URL è<br />
'<a href="http://miosito.it/index.php?option=" rel="nofollow ugc">miosito.it/index.php?option=</a>....' e non<br />
<a href="http://miosito.it/prodotti" rel="nofollow ugc">miosito.it/prodotti</a>.</p>
<p dir="auto">Credo che il problema sia legato al file .htaccess che allego di seguito:</p>
<h1>compress text, html, javascript, css, xml:</h1>
<p dir="auto">AddOutputFilterByType DEFLATE text/plain<br />
AddOutputFilterByType DEFLATE text/html<br />
AddOutputFilterByType DEFLATE text/xml<br />
AddOutputFilterByType DEFLATE text/css<br />
AddOutputFilterByType DEFLATE application/xml<br />
AddOutputFilterByType DEFLATE application/xhtml+xml<br />
AddOutputFilterByType DEFLATE application/rss+xml<br />
AddOutputFilterByType DEFLATE application/javascript<br />
AddOutputFilterByType DEFLATE application/x-javascript</p>
<h1>Or, compress certain file types by extension:</h1>
<p dir="auto">&lt;Files *.html&gt;<br />
SetOutputFilter DEFLATE<br />
&lt;/Files&gt;</p>
<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>
<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>
<p dir="auto"><a href="/hashtags/options">#Options</a> +FollowSymLinks</p>
<h1></h1>
<h1>mod_rewrite in use</h1>
<p dir="auto">RewriteEngine On</p>
<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>
<h1>php_flag register_globals off</h1>
<h1>php_flag safe_mode off</h1>
<h1>php_flag magic_quotes_gpc on</h1>
<p dir="auto">RewriteBase /</p>
<p dir="auto">########## Begin - Joomla! core SEF Section</p>
<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]<br />
RewriteRule ^principale.htm (.*)$   [R=301,L]</p>
<p dir="auto">########## End - Joomla! core SEF Section</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>
<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>
<pre><code># Disattivare ETags
</code></pre>
<p dir="auto">Header unset ETag<br />
&lt;/IfModule&gt;</p>
<h1>Disattivare gli ETags</h1>
<p dir="auto">FileETag none</p>
<p dir="auto">Le cartelle fisiche del sito risiedono in /var/www/html/miosito/</p>
<p dir="auto">Avete idea di come posso risolvere questo problema???</p>
<p dir="auto">Grazie</p>
]]></description><link>https://dev.connect.gt/topic/151333/non-funzionano-link-interni-con-mod_rewrite</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 04:52:07 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/151333.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 13 May 2011 15:34:26 GMT</pubDate><ttl>60</ttl></channel></rss>