Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Parere .htaccess

  1. #1

    Parere .htaccess

    Volevo chiedervi che ve ne pare di questo file .htaccess.
    Per favore spiegatemi come correggere eventuali errori o incompatibilità, oppure, se necessario, datemi consigli.
    Un'altra cosa: vorrei ottimizzarlo il più possibile per i motori di ricerca.

    Grazie.

    codice:
    Options -MultiViews +FollowSymlinks -Indexes
    # FileETag MTime Size
    FileETag None
    AddType image/x-icon .ico
    
    <IfModule mod_security.c>
    	# Turn off mod_security filtering.
    	SecFilterEngine Off
    	# The below probably isn't needed, but better safe than sorry.
    	SecFilterScanPOST Off
    </IfModule>
    
    <IfModule mod_rewrite.c>
    RewriteEngine on
    # Some hosts require RewriteBase to make RewriteRules work.
    	RewriteBase /forum/
    # Google SEO workaround for search.php highlights:
    # Make this rule the first rewrite rule in your .htaccess!
    	RewriteRule ^([^&]*)&(.*)$ http://www.*****/forum/$1?$2 [L,QSA,R=301]
    # Google SEO 404: 
    	ErrorDocument 404 /forum/misc.php?google_seo_error=404
    # Google SEO Sitemap:
    	RewriteRule ^sitemap-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]
    # Google SEO URL Forums:
    	RewriteRule ^F-([^./]+)\.html$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
    # Google SEO URL Threads:
    	RewriteRule ^T-([^./]+)\.html$ showthread.php?google_seo_thread=$1 [L,QSA,NC]
    # Google SEO URL Announcements:
    	RewriteRule ^A-([^./]+)\.html$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]
    # Google SEO URL Users:
    	RewriteRule ^U-([^./]+)\.html$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]
    # Google SEO URL Calendars:
    	RewriteRule ^C-([^./]+)\.html$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]
    # Google SEO URL Events:
    	RewriteRule ^E-([^./]+)\.html$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]
    # Obbligare uso WWW
    	RewriteCond %{HTTP_HOST} !^www.****** [NC]
    	RewriteRule ^(.*)$ http://www.********%{REQUEST_URI}
    	
    	<IfModule mod_env.c>
    		SetEnv SEO_SUPPORT 1
    	</IfModule>
    </IfModule>
    
    # Inizio Cache del Browser
    <IfModule mod_expires.c>
    ExpiresActive On
    # ExpiresDefault A2592000
    # Immagine
    	ExpiresByType image/x-icon A2592000
    	ExpiresByType image/gif A2592000
    	ExpiresByType image/jpeg A2592000
    	ExpiresByType image/png A2592000
    	ExpiresByType image/svg+xml A31536000
    	ExpiresByType image/ico A2592000
    	ExpiresByType image/bmp A2592000
    	ExpiresByType image/tiff A2592000
    # Testo	
    	ExpiresByType text/plain A2592000
    	ExpiresByType text/css A604800
    	ExpiresByType text/html A1
    	ExpiresByType text/javascript A2592000
        ExpiresByType text/php A1
        ExpiresByType text/htm A1
    	ExpiresByType text/xsd A2592000 
        ExpiresByType text/xsl A2592000 
        ExpiresByType text/xml A216000
    	ExpiresByType text/richtext A2592000
    	ExpiresByType text/txt A216000
    # Applicazioni
    	ExpiresByType application/javascript A2592000
    	ExpiresByType application/x-javascript A2592000
    	ExpiresByType application/pdf A604800
    	ExpiresByType application/x-shockwave-flash A604800
    	ExpiresByType application/java A31536000
    	ExpiresByType application/msword A31536000
        ExpiresByType application/x-msdownload A31536000
    	ExpiresByType application/x-gzip A31536000
    	ExpiresByType application/vnd.ms-access A31536000
    	ExpiresByType application/vnd.ms-project A31536000
        ExpiresByType application/vnd.oasis.opendocument.database A31536000
        ExpiresByType application/vnd.oasis.opendocument.chart A31536000
        ExpiresByType application/vnd.oasis.opendocument.formula A31536000
        ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
        ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
        ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
        ExpiresByType application/vnd.oasis.opendocument.text A31536000
    	ExpiresByType application/vnd.ms-powerpoint A31536000E
        ExpiresByType application/x-tar A31536000
    	ExpiresByType application/vnd.ms-write A31536000
    	ExpiresByType application/vnd.ms-excel A31536000
    	ExpiresByType application/zip A31536000
    # Video	
    	ExpiresByType video/x-flv A2592000
        ExpiresByType video/asf A2592000
        ExpiresByType video/avi A2592000
    	ExpiresByType video/divx A2592000
    	ExpiresByType video/quicktime A2592000
    	ExpiresByType video/mp4 A2592000
        ExpiresByType video/mpeg A2592000
    # Audio	
    	ExpiresByType audio/midi A2592000
        ExpiresByType audio/mpeg A32592000
    	ExpiresByType audio/ogg A2592000
    	ExpiresByType audio/x-realaudio A2592000
    	ExpiresByType audio/wav A2592000
    	ExpiresByType audio/wma A31536000
    </IfModule>
    # Fine Cache del Browser
    
    # Inizio Cache-Control Headers
    #<ifModule mod_headers.c>
    #  <filesMatch "\.(ico|jpe?g|png|gif|swf)$">
    #    Header set Cache-Control "public"
    #  </filesMatch>
    #  <filesMatch "\.(css)$">
    #    Header set Cache-Control "public"
    #  </filesMatch>
    #  <filesMatch "\.(js)$">
    #    Header set Cache-Control "private"
    #  </filesMatch>
    #  <filesMatch "\.(x?html?|php)$">
    #    Header set Cache-Control "private, must-revalidate"
    #  </filesMatch>
    #</ifModule>
    
    <ifModule mod_headers.c>
      <filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
        Header set Cache-Control "max-age=2592000, public"
      </filesMatch>
      <filesMatch "\\.(css)$">
        Header set Cache-Control "max-age=604800, public"
      </filesMatch>
      <filesMatch "\\.(js)$">
        Header set Cache-Control "max-age=2592000, private"
      </filesMatch>
      <filesMatch "\\.(xml|txt)$">
        Header set Cache-Control "max-age=216000, public, must-revalidate"
      </filesMatch>
      <filesMatch "\\.(html|htm|php|xhtml)$">
        Header set Cache-Control "private, must-revalidate"
      </filesMatch>
    </ifModule>
    #		<ifModule mod_headers.c>
    #		Header unset ETag
    #		</ifModule>
    # Fine Cache-Control Headers
    
    # Inizo Compressione GZip
    <IfModule mod_deflate.c>
    	AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css pplication/xml application/xhtml+xml application/rss+xml text/javascript application/javascript application/x-javascript
    </IfModule>
    # Fine Compressione Gzip

  2. #2
    Nella sezione della compressione hai dimenticato una "a" in application/xml
    Mi contraddico facilmente, ma lo faccio così spesso che questo fa di me una persona coerente [Caparezza]
    Se la conoscenza crea problemi, non è con l'ignoranza che li si risolve [Isaac Asimov]
    >>>Visita il mio blog<<<

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.