Posted - 11/01/2018 : 08:58:57
Andy I already have this all in my htaces from ITZAP. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^category/([^/.]*)/?$ /categories.php?cat=$1 [QSA,nc,L,B] RewriteRule ^products/([^/.]*)/?$ /products.php?cat=$1 [QSA,nc,L,B] RewriteRule ^manufacturer/?$ /categories.php?man=all [QSA,nc,L,B] RewriteRule ^manufacturer/([^/.]*)/?$ /products.php?man=$1 [QSA,nc,L,B] RewriteRule ^([^/.]+)$ proddetail.php?prod=$1 [QSA,nc,L,B] </IfModule>
# ====================================================== # 404 INFO # ====================================================== ErrorDocument 404 /404.html
# ====================================================== # Disable problematic ETag header since we are going to use Expires # ====================================================== Header unset Pragma FileETag None Header unset ETag # ====================================================== # Set Cache-Control and Expires headers # ====================================================== <FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf|pdf|flv|mp3)$"> <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 14 days" Header set Cache-Control "public" </IfModule> </FilesMatch> <FilesMatch "\.(html|htm|xml|txt|xsl)$"> Header set Cache-Control "max-age=7200, must-revalidate" </FilesMatch> # ----------------------------------------------------------------------- # Defining MIME types to ensure the web server actually knows about them. # ----------------------------------------------------------------------- <IfModule mod_mime.c> AddType text/css .css AddType application/javascript js AddType application/vnd.ms-fontobject eot AddType application/x-font-ttf ttf ttc AddType font/opentype otf AddType application/x-font-woff woff AddType image/svg+xml svg svgz AddEncoding gzip svgz </Ifmodule> # ====================================================== # Activate Gzip compression # ====================================================== <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/css application/json AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE text/xml application/xml text/x-component AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype <IfModule mod_setenvif.c> BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule> <IfModule mod_headers.c> Header append Vary User-Agent env=!dont-vary </IfModule> </IfModule>
Do I just add the new items or what?
# rename file .htaccess AddDefaultCharset UTF-8 <ifModule mod_headers.c> # Enable HSTS (HTTP Strict Transport Security), tells the browser to ALWAYS USE HTTPS Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS # Enable HTTP Keep-Alive to allow the same TCP connection to send and receive multiple HTTP requests, thus reducing the latency for subsequent requests Header set Connection keep-alive </ifModule> # ====================================================== # URL Rewrite Rules (-Indexes prevents visitors viewing website folder contents, 403 Access Forbidden) # ====================================================== <IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews -Indexes RewriteEngine On RewriteBase / RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https:// example.com/$1 [R,L] # REDIRECT www RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteRule ^(.*)$ https:// example.com/$1 [R=301,L] # REDIRECT index.php (THIS DOES NOT EFFECT SUBFOLDERS !!) RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ https:// example.com/$1 [R=301,L] </IfModule> thanks
Craig Matheny LazerMmodels.com

|