Keep in mind, I have my site blocks in here as well.
I also have to place my zlib compression statements into a php.ini file, as well as my statement to keep TransIDs from appearing in the headers. I will show my php.ini file below the htaccess file.
Also keep in mind, this htaccess file is in the root, and so is my cart installation.
Code:
<Files .htaccess>
order allow,deny
deny from all
</Files>
DirectoryIndex index.html index.php
Options +FollowSymLinks
RewriteEngine On
# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root xcart folder (i.e. RewriteBase /shop)
RewriteBase /
# Enable the following 3 lines if you want to make sure
# all users use the www. version of your domain.
# Helps prevent cookie issues for some X-Cart installations
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^my domain name.com [NC]
RewriteRule ^(.*)$ http://www.mydomain name.com/$1 [R=301,L]
##### XC SEO Lite
# Rewrite SEO category URL's
RewriteRule ^([^/]*/)?[^/]+-print-(productcode|title|price|orderby)-up-c-([0-9]+)-p-([0-9]+)\.html$
$1home.php?printable=Y&sort=$2&sort_direction=0&cat=$3&page=$4 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-(productcode|title|price|orderby)-down-c-([0-9]+)-p-([0-9]+)\.html$
$1home.php?printable=Y&sort=$2&sort_direction=1&cat=$3&page=$4 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-c-([0-9]+)-p-([0-9]+)\.html$
$1home.php?printable=Y&cat=$2&page=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-(productcode|title|price|orderby)-up-c-([0-9]+)-p-([0-9]+)\.html$
$1home.php?sort=$2&sort_direction=0&cat=$3&page=$4 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-(productcode|title|price|orderby)-down-c-([0-9]+)-p-([0-9]+)\.html$
$1home.php?sort=$2&sort_direction=1&cat=$3&page=$4 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-c-([0-9]+)-p-([0-9]+)\.html$
$1home.php?cat=$2&page=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-(productcode|title|price|orderby)-up-c-([0-9]+)\.html$
$1home.php?printable=Y&sort=$2&sort_direction=0&cat=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-(productcode|title|price|orderby)-down-c-([0-9]+)\.html$
$1home.php?printable=Y&sort=$2&sort_direction=1&cat=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-c-([0-9]+)\.html$
$1home.php?printable=Y&cat=$2 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-(productcode|title|price|orderby)-up-c-([0-9]+)\.html$
$1home.php?sort=$2&sort_direction=0&cat=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-(productcode|title|price|orderby)-down-c-([0-9]+)\.html$
$1home.php?sort=$2&sort_direction=1&cat=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-c-([0-9]+)\.html$
$1home.php?cat=$2 [QSA,L]
# Rewrite SEO manufacturers URL's
RewriteRule ^([^/]*/)?[^/]+-print-(productcode|title|price|orderby)-up-m-([0-9]+)-p-([0-9]+)\.html$
$1manufacturers.php?printable=Y&sort=$2&sort_direction=0&manufacturerid=$3&page=$4 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-(productcode|title|price|orderby)-down-m-([0-9]+)-p-([0-9]+)\.html$
$1manufacturers.php?printable=Y&sort=$2&sort_direction=1&manufacturerid=$3&page=$4 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-m-([0-9]+)-p-([0-9]+)\.html$
$1manufacturers.php?printable=Y&manufacturerid=$2&page=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-(productcode|title|price|orderby)-up-m-([0-9]+)-p-([0-9]+)\.html$
$1manufacturers.php?sort=$2&sort_direction=0&manufacturerid=$3&page=$4 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-(productcode|title|price|orderby)-down-m-([0-9]+)-p-([0-9]+)\.html$
$1manufacturers.php?sort=$2&sort_direction=1&manufacturerid=$3&page=$4 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-m-([0-9]+)-p-([0-9]+)\.html$
$1manufacturers.php?manufacturerid=$2&page=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-(productcode|title|price|orderby)-up-m-([0-9]+)\.html$
$1manufacturers.php?printable=Y&sort=$2&sort_direction=0&manufacturerid=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-(productcode|title|price|orderby)-down-m-([0-9]+)\.html$
$1manufacturers.php?printable=Y&sort=$2&sort_direction=1&manufacturerid=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-m-([0-9]+)\.html$
$1manufacturers.php?printable=Y&manufacturerid=$2 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-(productcode|title|price|orderby)-up-m-([0-9]+)\.html$
$1manufacturers.php?sort=$2&sort_direction=0&manufacturerid=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-(productcode|title|price|orderby)-down-m-([0-9]+)\.html$
$1manufacturers.php?sort=$2&sort_direction=1&manufacturerid=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-m-([0-9]+)\.html$
$1manufacturers.php?manufacturerid=$2 [QSA,L]
# Rewrite SEO product URL's
RewriteRule ^([^/]*/)?[^/]+-print-c-([0-9]+)-p-([0-9]+)-pr-([0-9]+)\.html$
$1product.php?printable=Y&productid=$4&cat=$2&page=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-c-([0-9]+)-p-([0-9]+)-pr-([0-9]+)\.html$
$1product.php?productid=$4&cat=$2&page=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-pr-([0-9]+)\.html$
$1product.php?printable=Y&productid=$2 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-pr-([0-9]+)\.html$
$1product.php?productid=$2 [QSA,L]
# Rewrite SEO static page URL's
RewriteRule ^([^/]*/)?[^/]+-print-pg-([0-9]+)\.html$
$1pages.php?printable=Y&pageid=$2 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-pg-([0-9]+)\.html$
$1pages.php?pageid=$2 [QSA,L]
# Rewrite SEO search URL's
RewriteRule ^([^/]*/)?([^/]+)-search-c-([0-9]+)(-[^-]+)*\.html$
$1search.php?mode=search&substring=$2&cat=$3 [QSA,L]
RewriteRule ^([^/]*/)?([^/]+)-search(-[^-]+)*\.html$
$1search.php?mode=search&substring=$2 [QSA,L]
##### / XC SEO Lite
# SNIP BELOW - BASIC BLOCK LIST START
#block access to sensitive areas of my domain name
#block apache UserDir Sensitive Information Disclosure
RedirectMatch ^/~(.*)$ http://my-target-webserver.somewhere.org/$1
# block all smarty templates (no reason to have these exposed)
RedirectMatch gone ^/.*\.tpl$
# block all .log (log files), .sql (sql dump/export) and .conf (config files) files
# in case some day these files move to another directory
RedirectMatch gone ^.*\.(sql|log|conf|bak)$
# block access to the 'Smarty-*' directory
RedirectMatch gone ^.*Smarty.*$
# block common cart files that could reveal
# that you have this cart installed
RedirectMatch gone VERSION.*
RedirectMatch gone COPYRIGHT.*
RedirectMatch gone INSTALL.*
RedirectMatch gone NEW.*
RedirectMatch gone README.*
RedirectMatch gone UPGRADE.*
# block access to /upgrade
Redirect gone /upgrade
# block access to the /sql directory
Redirect gone /sql
# block access to the /shipping directory
Redirect gone /shipping
# block access to the pgp directories
Redirect gone /.pgp
Redirect gone /.pgp.def
# block the entire log directory
Redirect gone /tmp
Redirect gone /var
# block the entire log directory
ReDirect gone /log
# block the version.php
RedirectMatch gone ^.*/include/version.php
#SNIP BELOW - BASIC DENY LIST START
AuthName "Country access blocked"
AuthType Basic
<Limit GET POST>
deny from .id
deny from .interpacket.net
deny from .lt
deny from .mk
deny from .my
deny from .ro
deny from .ru
deny from .yu
deny from 139.92
deny from 152.158
deny from 161.142
deny from 202.127
deny from 202.134
deny from 202.145
deny from 202.146
deny from 202.147
deny from 202.148
deny from 202.149
deny from 202.150
deny from 202.151
deny from 202.152
deny from 202.153
deny from 202.154
deny from 202.155
deny from 202.156
deny from 202.157
deny from 202.158
deny from 202.159
deny from 202.160
deny from 202.162
deny from 202.164
deny from 202.168
deny from 202.171
deny from 202.178
deny from 202.180
deny from 202.183
deny from 202.184
deny from 202.185
deny from 202.186
deny from 202.187
deny from 202.188
deny from 202.189
deny from 202.190
deny from 202.4
deny from 202.46
deny from 202.47
deny from 202.57
deny from 202.58
deny from 202.59
deny from 202.93
deny from 202.95
deny from 207.192.198
deny from 210.14
deny from 210.16
deny from 210.186
deny from 210.19
deny from 210.56
deny from 212.138
deny from 212.19
deny from 212.50
deny from 212.59
deny from 213.169
deny from 213.240
deny from 216.3.242.10
deny from 217.9
deny from 62.220.194
deny from 64.110
deny from 64.49
deny from 61.5
deny from 203.106
deny from 203.130.254
deny from 208.210.48
deny from 208.210.49
deny from 208.210.50
deny from 208.210.51
deny from 211.104
deny from 211.105
deny from 211.106
deny from 211.107
deny from 211.108
deny from 211.109
deny from 211.110
deny from 211.111
deny from 211.112
deny from 211.113
deny from 211.114
deny from 211.115
deny from 211.116
deny from 211.117
deny from 211.118
deny from 211.119
deny from 213.137
deny from 207.115.179
#canada fraud server
Deny from 207.35.39
#new Indonesia netblock
deny from 202.138.224
deny from 202.138.225
deny from 202.138.226
deny from 202.138.227
deny from 202.138.228
deny from 202.138.229
deny from 202.138.23
deny from 202.138.24
deny from 202.138.25
#my block list
deny from 80
deny from 81
deny from 82
deny from 83
deny from 84.63.17.9
deny from 193.172.246.192
deny from 212.30.118.74
deny from 70.87.63.234
#my robots block list
#BecomeBot
deny from 64.124.85
</Limit>
#SNIP ABOVE - BASIC DENY LIST END