RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://customrubbersiliconemolds.com/$1 [R,L]

#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_FILENAME}\.php -f
#RewriteRule ^(.*)$ $1.php

# Remove multiple slashes from the URL
RewriteCond %{THE_REQUEST} \s//+
RewriteRule .* / [R=301,L]

# Remove trailing slash for generic URLs
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+?)/$ /$1 [R=301,L]



# 🔒 Protect sensitive files
<FilesMatch "(\.htaccess|config\.php|composer\.json|composer\.lock|error_log)$">
  Require all denied
</FilesMatch>

RewriteRule ^sitemap-service\.xml/?$ sitemap-service.php
RewriteRule ^sitemap-city\.xml/?$ sitemap-city.php
RewriteRule ^sitemap-blog\.xml/?$ sitemap-blog.php
#RewriteRule ^sitemap-state\.xml/?$ sitemap-state.php
#RewriteRule ^sitemap-city1\.xml/?$ sitemap-city1.php
#RewriteRule ^sitemap-city2\.xml/?$ sitemap-city2.php
#RewriteRule ^sitemap-city3\.xml/?$ sitemap-city3.php
#RewriteRule ^sitemap-city4\.xml/?$ sitemap-city4.php
#RewriteRule ^sitemap-city5\.xml/?$ sitemap-city5.php
#RewriteRule ^sitemap-city6\.xml/?$ sitemap-city6.php
#RewriteRule ^sitemap-city7\.xml/?$ sitemap-city7.php
#RewriteRule ^sitemap-city8\.xml/?$ sitemap-city8.php
#RewriteRule ^sitemap-menu\.xml/?$ sitemap-menu.php

Options +FollowSymlinks

RewriteRule ^rubber-custom-moulding-mooulding-products$ /rubber-custom-molding-products [R=301,L]
RewriteRule ^knowledge-base/(.*)$ /blog/$1 [R=301,L]

RewriteRule ^(.*\/)?custom-cheap-silicone-molds-making(\/.*)?$ /$1silicone-custom-molds-manufacturers$2 [R=301,L]
RewriteRule ^(.*\/)?rubber-custom-moulding-mooulding-products(\/.*)?$ /$1custom-rubber-molding-products$2 [R=301,L]
RewriteRule ^(.*\/)?cubber-corner-push-on-edge-trim-seal(\/.*)?$ /$1rubber-corner-push-on-edge-trim-seal$2 [R=301,L]

RewriteRule ^(.*\/)?liquid-rubber-mold-company(\/.*)?$ /$1custom-rubber-molds-manufacture$2 [R=301,L]
RewriteRule ^(.*\/)?rubber-latex-moulds-making-for-concrete(\/.*)?$ /$1custom-rubber-molds-manufacture$2         

RewriteRule ^(.*\/)?large-round-and-square-silicone-molds(\/.*)?$ /$1silicone-custom-molds-manufacturers$2 [R=301,L]
RewriteRule ^(.*\/)?mini-small-and-tiny-silicone-molds(\/.*)?$ /$1silicone-custom-molds-manufacturers$2 [R=301,L]
RewriteRule ^(.*\/)?flexible-cool-wholesale-silicone-molds(\/.*)?$ /$1silicone-custom-molds-manufacturers$2 [R=301,L]
RewriteRule ^(.*\/)?commercial-personalized-silicone-molds-making-service(\/.*)?$ /$1silicone-custom-molds-manufacturers$2 [R=301,L]
RewriteRule ^(.*\/)?liquid-silicone-rubber-mold-manufacturers(\/.*)?$ /$1silicone-custom-molds-manufacturers$2 [R=301,L]

RewriteRule ^(.*\/)?silicone-chocolate-molds-manufacturers-and-suppliers(\/.*)?$ /$1food-grade-custom-silicone-mold-making$2 [R=301,L]
RewriteRule ^(.*\/)?custom-rubber-silicone-baking-molds-supplier(\/.*)?$ /$1food-grade-custom-silicone-mold-making$2 [R=301,L]
RewriteRule ^(.*\/)?silicone-cake-jelly-baking-molds(\/.*)?$ /$1food-grade-custom-silicone-mold-making$2 [R=301,L]
RewriteRule ^(.*\/)?silicone-custom-cookie-candy-and-lollipop-molds(\/.*)?$ /$1food-grade-custom-silicone-mold-making$2 [R=301,L]
RewriteRule ^(.*\/)?silicone-pastry-and-butter-molds-makers(\/.*)?$ /$1food-grade-custom-silicone-mold-making$2 [R=301,L]
RewriteRule ^(.*\/)?silicone-ice-cube-trays-mold(\/.*)?$ /$1food-grade-custom-silicone-mold-making$2 [R=301,L]
RewriteRule ^(.*\/)?commercial-mini-silicone-popsicle-molds-maker(\/.*)?$ /$1food-grade-custom-silicone-mold-making$2 [R=301,L]

RewriteRule ^(.*\/)?rubber-goods-and-component-manufacturer(\/.*)?$ /$1molded-rubber-products-and-moulding-parts$2 [R=301,L]
RewriteRule ^(.*\/)?small-precision-automotive-rubber-parts-suppliers(\/.*)?$ /$1molded-rubber-products-and-moulding-parts$2 [R=301,L]

RewriteRule ^(.*\/)?casting-silicone-rubber-parts-and-components-company(\/.*)?$ /$1bulk-deep-molding-silicone-parts$2 [R=301,L]

RewriteRule ^(.*\/)?rubber-profile-gasket-seal-extrusion-manufacturers(\/.*)?$ /$1rubber-extrusion-profiles$2 [R=301,L]
RewriteRule ^(.*\/)?extruded-rubber-products-manufacturers(\/.*)?$ /$1rubber-extrusion-profiles$2 [R=301,L]
RewriteRule ^(.*\/)?window-rubber-beading-manufacturer-abd-suppliers(\/.*)?$ /$1rubber-extrusion-profiles$2 [R=301,L]
RewriteRule ^(.*\/)?extruded-rubber-u-channel-extrusion(\/.*)?$ /$1rubber-extrusion-profiles$2 [R=301,L]

RewriteRule ^(.*\/)?rubber-corner-push-on-edge-trim-seal(\/.*)?$ /$1automotive-rubber-molding-for-car-window$2 [R=301,L]

RewriteRule ^(.*\/)?gum-rubber-tubing-manufacturer(\/.*)?$ /$1custom-rubber-tubing$2 [R=301,L]
RewriteRule ^(.*\/)?silicone-medical-grade-tubing-extrusion-suppliers(\/.*)?$ /$1custom-rubber-tubing$2 [R=301,L]
RewriteRule ^(.*\/)?silicone-rubber-tubing-mold-suppliers(\/.*)?$ /$1custom-rubber-tubing$2 [R=301,L]

RewriteRule ^(.*\/)?custom-silicone-door-rubber-gasket-tape-maker(\/.*)?$ /$1custom-molded-rubber-gaskets-suppliers$2 [R=301,L]

RewriteRule ^(.*\/)?rubber-o-rings-seals-suppliers-and-manufacturers(\/.*)?$ /$1custom-rubber-o-rings$2 [R=301,L]
RewriteRule ^(.*\/)?viton-large-o-ring-seal-manufacturers(\/.*)?$ /$1custom-rubber-o-rings$2 [R=301,L]
RewriteRule ^(.*\/)?silicone-o-rings-manufacturer-and-supplier(\/.*)?$ /$1custom-rubber-o-rings$2 [R=301,L]

RewriteRule ^(.*\/)?industrial-flexible-custom-rubber-bellows(\/.*)?$ /$1molded-rubber-bellows-suppliers-and-manufactures$2 [R=301,L]
RewriteRule ^(.*\/)?rubber-bellows-expansion-joints-manufacturers(\/.*)?$ /$1molded-rubber-bellows-suppliers-and-manufactures$2 [R=301,L]

RewriteRule ^(.*\/)?electrical-rubber-wire-grommets-for-cord(\/.*)?$ /$1custom-rubber-industrial-grommets-manufacturer$2 [R=301,L]
RewriteRule ^(.*\/)?high-temp-silicone-rubber-grommets-manufacturer(\/.*)?$ /$1custom-rubber-industrial-grommets-manufacturer$2 [R=301,L]
RewriteRule ^(.*\/)?white-and-black-colored-rubber-desk-grommets(\/.*)?$ /$1custom-rubber-industrial-grommets-manufacturer$2 [R=301,L]
RewriteRule ^(.*\/)?rubber-grommet-seal-and-plug-assortment(\/.*)?$ /$1custom-rubber-industrial-grommets-manufacturer$2 [R=301,L]
RewriteRule ^(.*\/)?small-and-large-1-inch-rubber-oval-grommets(\/.*)?$ /$1custom-rubber-industrial-grommets-manufacturer$2 [R=301,L]
RewriteRule ^(.*\/)?automotive-closed-rubber-grommets-for-cars-online(\/.*)?$ /$1custom-rubber-industrial-grommets-manufacturer$2 [R=301,L]

RewriteRule ^(.*\/)?rubber-isolator-radiator-mount-bushing(\/.*)?$ /$1small-neoprene-rubber-bushes$2 [R=301,L]

RewriteRule ^(.*\/)?rubber-vibration-isolator-mounts-manufacturers-and-suppliers(\/.*)?$ /$1anti-vibration-fan-electric-motor-mounts$2 [R=301,L]
RewriteRule ^(.*\/)?rubber-shock-absorber-anti-vibration-mounts(\/.*)?$ /$1anti-vibration-fan-electric-motor-mounts$2 [R=301,L]
RewriteRule ^(.*\/)?silicone-anti-vibration-industrial-mounts(\/.*)?$ /$1anti-vibration-fan-electric-motor-mounts$2 [R=301,L]
RewriteRule ^(.*\/)?anti-vibration-standoffs-isolators-rubber-feet(\/.*)?$ /$1anti-vibration-fan-electric-motor-mounts$2 [R=301,L]
#RewriteRule ^(.*\/)?anti-vibration-fan-electric-motor-mounts(\/.*)?$ /$1anti-vibration-fan-electric-motor-mounts$2 [R=301,L]
RewriteRule ^(.*\/)?rubber-vibration-isolators-hvac-feet(\/.*)?$ /$1anti-vibration-fan-electric-motor-mounts$2 [R=301,L]

RewriteRule ^(.*\/)?rv-rubber-trim-molding-flooring(\/.*)?$ /$1rubber-t-shaped-molding-flooring-for-countertops$2 [R=301,L]

RewriteRule ^(.*\/)?buy-large-stock-and-thermoformed-clamshell-packaging-suppliers(\/.*)?$ /$1custom-wholesale-blister-pack-packaging-manufacturers-companies$2 [R=301,L]
RewriteRule ^(.*\/)?slide-blister-pack-packaging-suppliers-manufacturers(\/.*)?$ /$1custom-wholesale-blister-pack-packaging-manufacturers-companies$2 [R=301,L]
RewriteRule ^(.*\/)?tablet-capsule-and-pill-blister-pack-packaging-supplies(\/.*)?$ /$1custom-wholesale-blister-pack-packaging-manufacturers-companies$2 [R=301,L]
RewriteRule ^(.*\/)?medical-medication-blister-packaging-supplies(\/.*)?$ /$1custom-wholesale-blister-pack-packaging-manufacturers-companies$2 [R=301,L]
RewriteRule ^(.*\/)?blister-clamshell-cosmetic-packaging(\/.*)?$ /$1custom-wholesale-blister-pack-packaging-manufacturers-companies$2 [R=301,L]
RewriteRule ^(.*\/)?pvc-calmshell-blister-pack-packaging(\/.*)?$ /$1custom-wholesale-blister-pack-packaging-manufacturers-companies$2 [R=301,L]
RewriteRule ^(.*\/)?pharmaceutical-blister-pack-packaging-solution-companies(\/.*)?$ /$1custom-wholesale-blister-pack-packaging-manufacturers-companies$2 [R=301,L]
RewriteRule ^(.*\/)?plastic-blister-packaging-tray-manufacturers-suppliers(\/.*)?$ /$1custom-wholesale-blister-pack-packaging-manufacturers-companies$2 [R=301,L]

RewriteRule ^(.*\/)?rubber-muffler-hanger-holders-exhaust(\/.*)?$ /$1flexible-rubber-exhaust-mount$2 [R=301,L]
RewriteRule ^(.*\/)?universal-rubber-exhaust-hanger-for-tailpipe(\/.*)?$ /$1flexible-rubber-exhaust-mount$2 [R=301,L]

RewriteRule ^(.*\/)?rubber-trim-and-silicone-bulb-seal-products-manufacturers(\/.*)?$ /$1rubber-seal-products-manufacturers$2 [R=301,L]
RewriteRule ^(.*\/)?small-rubber-bed-stoppers-with-holes(\/.*)?$ /$1rubber-seal-products-manufacturers$2 [R=301,L]
RewriteRule ^(.*\/)?rubber-expansion-hole-pipe-plugs(\/.*)?$ /$1rubber-seal-products-manufacturers$2 [R=301,L]

RewriteRule ^(.*\/)?medical-grade-silicone-molding(\/.*)?$ /$1medical-silicone-molding$2 [R=301,L]






RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^([a-zA-Z0-9_-]+)$ country.php?country=$1
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ state.php?country=$1&state=$2
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ county.php?country=$1&state=$2&county=$3



# Enable Compression
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
</IfModule>
<IfModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>

# Leverage Browser Caching
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType image/jpg "access 1 year"
  ExpiresByType image/jpeg "access 1 year"
  ExpiresByType image/gif "access 1 year"
  ExpiresByType image/png "access 1 year"
  ExpiresByType text/css "access 1 month"
  ExpiresByType text/html "access 1 month"
  ExpiresByType application/pdf "access 1 month"
  ExpiresByType text/x-javascript "access 1 month"
  ExpiresByType application/x-shockwave-flash "access 1 month"
  ExpiresByType image/x-icon "access 1 year"
  ExpiresDefault "access 1 month"
</IfModule>

<IfModule mod_headers.c>
  <filesmatch "\.(ico|flv|jpg|jpeg|png|gif|css|swf)$">
  Header set Cache-Control "max-age=2678400, public"
  </filesmatch>
  <filesmatch "\.(html|htm)$">
  Header set Cache-Control "max-age=7200, private, must-revalidate"
  </filesmatch>
  <filesmatch "\.(pdf)$">
  Header set Cache-Control "max-age=86400, public"
  </filesmatch>
  <filesmatch "\.(js)$">
  Header set Cache-Control "max-age=2678400, private"
  </filesmatch>
</IfModule>

#RewriteRule ^([a-zA-Z0-9_-]+)$ country.php?country=$1
#RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ state.php?country=$1&state=$2
#RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ county.php?country=$1&state=$2&county=$3

ErrorDocument 404 /404page.php

<Files 403.shtml>
order allow,deny
allow from all
</Files>

deny from 47.79.120.246
deny from 47.79.7.207
deny from 47.79.98.4
deny from 47.79.5.125
deny from 47.79.123.143
deny from 47.79.119.52
deny from 47.79.0.46
deny from 47.79.3.84
deny from 47.79.122.138
deny from 47.79.119.20
deny from 47.79.3.216
deny from 47.79.3.70
deny from 47.79.118.225
deny from 47.79.5.247
deny from 47.79.4.28
deny from 47.79.2.223
deny from 47.79.123.29
deny from 47.79.98.30
deny from 47.79.1.97
deny from 47.79.98.125
deny from 47.79.121.159
deny from 47.79.1.234
deny from 47.79.117.165
deny from 47.79.117.123
deny from 47.79.121.170
deny from 80.85.247.231
deny from 185.21.13.119
deny from 172.247.32.195
deny from 212.34.140.200
deny from 91.84.110.151
deny from 5.35.69.6
deny from 91.84.111.136
deny from 91.246.41.166
deny from 80.85.246.144

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php82” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
