X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   XC SEO v1.1.0 Released (https://forum.x-cart.com/showthread.php?t=25297)

intel352 11-13-2006 06:20 PM

Re: XC SEO v1.1.0 Released
 
The froogle modification is incorrect, please ignore it for now. Don't modify your froogle module, use it as you normally would. When someone visits your website from froogle, they'll be auto-redirected to the new SEO'd url.

The froogle modification will be fixed soon.

LiLCrafter 11-15-2006 12:03 AM

Re: XC SEO v1.1.0 Released
 
I just added this mod to a new store, and everything went smooth.

As soon as I add the htaccess file and check the box to use the mod, I get total internal server errors.

I remove the htaccess file and I see html links rewritten in url, but until I uncheck the box for the mod to be enabled, the cart will not work again.

I have quadroopled the installation notes and actions, and I am dead on for installation, but it must be a server setting.

B4 anyone asks, yes, I am on linux base with apache, and I use rewrite rule for other attributes, so I know it works.

I need to open within a week, and need an SEO mod, so if I cannot get this to work, I must revert to another mod I have used in the past (pay version)

Was hoping to save money and time, but looks like it will be neither.

Anyone have any suggestions on internal server errors?

Server settings that may not allow this mod to woek oujt of box and require work around?

intel352 11-15-2006 02:36 AM

Re: XC SEO v1.1.0 Released
 
please paste (inside CODE blocks) the full htaccess you were using when the mod did not work (including the changes that were required by XC SEO)

LiLCrafter 11-15-2006 10:53 AM

Re: XC SEO v1.1.0 Released
 
Quote:

Originally Posted by intel352
please paste (inside CODE blocks) the full htaccess you were using when the mod did not work (including the changes that were required by XC SEO)


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


LiLCrafter 11-15-2006 10:55 AM

Re: XC SEO v1.1.0 Released
 
Got nailed for too much text, so I had to remove some and add it here for your use, as I thought some of this additional info may come in handy, and then again, maybe not...

I was told by a vendor that I have used for a commercial rewrite mod that I have used in the past for other sites, that the php.ini file was interfearing with one installation I had, and there had to be another snippet of code devised to accomodate this.

This particular site is also on the same host, so maybe this is what is happening here? Not sure, thought I would offer that tidbit up for your thought.


Here is the php.ini file.

Code:

magic_quotes_gpc on

# turn off sessions
session.use_trans_sid off

output_buffering = Off
output_handler =
zlib.output_compression = On




Thanks for the review.


Also FYI... when I remove all of the rewrite statements from this mod, I keep the sercurity portion, as I have this enabled in all of my sites with or without this mod. In this case, I simply grouped my secure portion of my htaccess to match yours, and added the grouped portion of redirect gone files like copyright, version, install etc, as I had them listed individually, and not grouped like this, but it looked like this saved some space, so I decided to use your layout. Other than that, it all looks the same as I have used in the past.

Hope some of this info helps.

mitash 11-15-2006 01:41 PM

Re: XC SEO v1.1.0 Released
 
What's the difference between...

RedirectMatch gone ^.*/shipping/.*$
Redirect gone /shipping

LiLCrafter 11-15-2006 02:49 PM

Re: XC SEO v1.1.0 Released
 
Quote:

Originally Posted by mitash
What's the difference between...

RedirectMatch gone ^.*/shipping/.*$
Redirect gone /shipping


the simple redirect gone shipping is only for the shipping file and the other is for the shipping file and all php files in it dealing with shipping.

mitash 11-15-2006 03:05 PM

Re: XC SEO v1.1.0 Released
 
Quote:

the simple redirect gone shipping is only for the shipping file and the other is for all php files dealing with shipping.


Thanks for your reply..

RedirectMatch gone ^.*/shipping/.*$ - This one deals with all php files with shipping...
Redirect gone /shipping - This one deals with only shipping

Should I be using both or just one..?

LiLCrafter 11-15-2006 03:24 PM

Re: XC SEO v1.1.0 Released
 
You have it listed correctly, so you see the just of it.

In my personal experience, I have used the simple shipping directory denial, and it was to keep bots from that area, or prying eyes, and crawlers from personal crawler that builds my Google Site Map.

Now I am not sure how this SEO mod operates, but there may be a need to keep the files associated with shipping from being rewritten.

I guess that in itself would have to be answered initially, to then follow up with the question of which is to be used.

If that was the case, and you wanted to keep the rewrite mod away from the shipping files, and you also want to keep prying eyes away, then that would justify using both I guess.


OR, if you are really paranoid, lol, I guess you could use the one that uses the most secure protocol, and that would be the denial of the file area AND the files within it.

Was that clear as mud?

This is how I see this anyhow. Someone else may have another opinion or an idea as to why to use one over the other. There are always ideas and different thoughts when it comes to things like this. You know how that goes.

intel352 11-15-2006 05:20 PM

Re: XC SEO v1.1.0 Released
 
the secure.htaccess file that I included with XC SEO has nothing to do with actual rewriting, just my recommendation (based upon reading in the X-Cart forum) for securing your x-cart installation. as for the issue that you're experiencing with XC SEO, it looks as if you've implemented the htaccess stuff correctly.

what version apache are you running? i believe you mentioned running a commercial seo mod before, i assume it worked without any issues?

can you post a url that hasn't been rewritten by xc seo, post a url that HAS been rewritten by xc seo? also, do you have access to your Apache error logs? might be good to post the logs, they should list any issues occurring due to htaccess rules.


All times are GMT -8. The time now is 10:56 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.