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.

LiLCrafter 11-15-2006 06:44 PM

Re: XC SEO v1.1.0 Released
 
removed

CraftersHelper 11-16-2006 11:54 AM

Re: XC SEO v1.1.0 Released
 
Any responce on the above post?

One way or the other, we really need to get this resolved, even if we must revert to a paid mod.

We simply thought we would try this route since it could potentially save a few bucks, but if it makes up for it in time lost, then we have saved nothing.

Sad, but true.

We have gone over everything we could find and to us, it comes down to thinking it is a server set up maybe.

Files look good, everything is in place, and all of the other optional files were modified as well.

We have installed many mods and completed many hacks, so it isn't like this is a new thing for us.

Thanks for any help guys

intel352 11-16-2006 03:48 PM

Re: XC SEO v1.1.0 Released
 
PM me FTP access to your site, I'll take a look at everything, find what I can. additionally, if your site is *not* live, i can do some debugging to try to track down the issue for you.

Otherwise, as you mentioned, everything *seems* okay from what you've shown me.

CraftersHelper 11-16-2006 04:51 PM

Re: XC SEO v1.1.0 Released
 
I have gone back over this mod and looked at all files and everything was in its place.

I have gone back and re-added the portion of the rewrite code to the htaccess and activated it again.

After clearing the cache several times, I have found this mod to now work, but things seem slower than they were.

I am not sure if it is due to slow down in internet provider or site at this point.

I will have to do site speed tests to try to determin this.

At least things appear to be trying to work as described though.

I am now going to add the optional code snippets back to the optional files and see if this will remain operational.

Any ideas on speed degredation?

intel352 11-16-2006 04:54 PM

Re: XC SEO v1.1.0 Released
 
don't worry about any of the "optional" changes. I made 1 change (to func.php, in the func_header_redirect function), the other changes aren't needed unless you want froogle.php modified

additionally, your site was running slow for me anyways, so I'm not noticing a speed difference. this WILL be slightly slower than normal though, but it shouldn't be noticeable. there is an amount of rewriting that occurs in php, and an amount of rewriting that occurs in the .htaccess file. I think if you remove most of your other custom code from the .htaccess file, you'll find a slight speed increase.

CraftersHelper 11-16-2006 05:07 PM

Re: XC SEO v1.1.0 Released
 
I have noticed that links like recommend and upsell do not appear to be html until after they are clicked and then and only then are they "ReWritten" to appear to be html.

I look at the main category links and hover over then and they appear to be html right off, and I look at speedbar links and they appear to be php.

So, liiks like the only links that are html when hovered over are catagories, but the remaining links are php.

Now results of all links except for the speedbar change once clicked and in the browser. The speedbar links never change and remain php after click.

Am I on the same page here with the rest of the clan using this ,mod?

Or is there a gap somewhere that should not be?

CraftersHelper 11-16-2006 05:26 PM

Re: XC SEO v1.1.0 Released
 
reverted

Miniature-Giant 11-18-2006 08:41 AM

Re: XC SEO v1.1.0 Released
 
Hm, could someone please clue me in a bit?

I have downloaded, installed, edited, etc., etc., and think that I have the module "working". But...
How do I tell, am I supposed to do something else to "use' it, e.g., do I need to remake my "HTML catalog"? Should I see a change in the urls in the address bar when I surf my site and click on products, etc.
Perhaps someone can point me toward a doc that describes what this does, etc. -- sorry to be so dense on this subject. I'm just not that familiar with some of these SEO tools and nominclature.

Thanks!
James

pcparts 11-18-2006 12:31 PM

Re: XC SEO v1.1.0 Released
 
Yes you should see changes in the address bar for example
www.yourwebsite.com/bfg-nvidia-nforce-680i-sli-dual-pciex16-ddr2-800-intel-socket-77-Pc-pr-1080.html
intel352 showed some sites that are using it on the 1st page i think.

Miniature-Giant 11-18-2006 01:49 PM

Re: XC SEO v1.1.0 Released
 
Well, it seems to have "done its thing" -- I can see a change now.
Now when I click on a category link, I get a "Not Found" error:
The requested URL /www/vhosts/m/miniature-giant.com/htd

Apache/1.3.33 Server at www.miniature-giant.com Port 80ocs/www/store/home.php was not found on this server.

The address bar shows the url:
http://www.miniature-giant.com/store/cav-Reaper-c-249.html

My server doesn't have a file "cav-Reaper-c-249.html" in the store/
but, at least, it does look like the kind of html page address that is shown in the demo example -- progress!!

Anyone have any idea what I may be doing wrong, or what I need to do to take advantage of this mod? I'm really interested in getting this going and would appreciate any help/advice...

Thanks,
James

intel352 11-18-2006 11:24 PM

Re: XC SEO v1.1.0 Released
 
Sounds like you haven't implemented the .htaccess file that was provided in the download. The .htaccess file rules are what make those fake urls actually work.

Miniature-Giant 11-19-2006 05:09 AM

Re: XC SEO v1.1.0 Released
 
Thanks for the direction. In fact, that was the part of the instructions that I was least sure of (except for the optional multi-language edit -- couldn't find the line to modify).

The instructions state:
* If needed, you may have to manually copy/paste the content of the .htaccess file into your existing .htaccess file

I'm not sure what "if needed" or "may have to" mean -- sorry for my ignorance. I already had a ".htaccess" file in my store, but it only had one line:
DirectoryIndex index.html index.php

I first tried replacing this one-line file with yours, and this morning, I tried appending your file's contents to this one-liner. I then turned the module "XC SEO" on in my admin interface. Both ways resulted in the same error messages.

I read on the forum that one shouldn't have their store below the "root directory". I currently have mine in a folder called "store". Would this be causing this problem? Should I move everything up one folder?

Any help would be greatly appreciated!!

Thanks,
James

Miniature-Giant 11-19-2006 08:16 AM

Re: XC SEO v1.1.0 Released
 
Ouch,
OK, I feel stupid -- guess I should read more!
I started reading the content of the .htaccess files to see if I could figure them out (and fix what was wrong).
I found that there are instructions in your .htaccess (to remove some comment marks, #).
Did that.
It now works -- thanks!!
I'm going to try my luck and see if I can get my sku numbers to appear in my product page htmls.
Thanks again,
James

Miniature-Giant 11-19-2006 10:53 AM

Re: XC SEO v1.1.0 Released
 
I was wanting to include the sku in my product html urls (in my line, sku's are often searched for by customers).
I modified the xcart code to include the sku in the links from the thumbnails on the catalog pages, e.g.,
http://www.miniature-giant.com/product.php?productid=20&cat=410&page=2&sku=1504

I then modified the .htaccess file to use the sku (or so I thought):

# Rewrite SEO product URL's
RewriteRule ^([^/]*/)?[^/]+-print-c-([0-9]+)-p-([0-9]+)-pr-([0-9]+)-sku-([0-9]+)\.html$ $1product.php?printable=Y&productid=$4&cat=$2&page =$3&sku=$5 [QSA,L]
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]+)-sku-([0-9]+)\.html$ $1product.php?productid=$4&cat=$2&page=$3&sku=$5 [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]+)-sku-([0-9]+)\.html$ $1product.php?printable=Y&productid=$2&sku=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-pr-([0-9]+)\.html$ $1product.php?printable=Y&productid=$2 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-pr-([0-9]+)-sku-([0-9]+)\.html$ $1product.php?productid=$2&sku=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-pr-([0-9]+)\.html$ $1product.php?productid=$2 [QSA,L]

I then turned the XC SEO module off then on and tested.
The html url is the same as it was before, e.g.,
http://www.miniature-giant.com/urban-legend-sophie-72mm-Reaper-c-410-p-2-pr-20.html

Any idea what I am doing wrong (or what I am neglicting to do)?

Thanks in advance!
James

Miniature-Giant 11-19-2006 12:35 PM

Re: XC SEO v1.1.0 Released
 
Found the problem -- needed to edit the outputfiler.seo.php
Thanks,
James

intel352 11-20-2006 05:20 AM

Re: XC SEO v1.1.0 Released
 
What did you have to edit in the outputfilter? (just curious)

Miniature-Giant 11-20-2006 08:13 AM

Re: XC SEO v1.1.0 Released
 
I made two edits -- for two different feature additions:
1) to include the "sku" in the url, I edited the function _product_filename by adding the line:
if ($options['sku'] && !defined("IS_ROBOT"))
$options['result_title'] .= $this->_sku_prefix.$options['sku'];
after the similar line for the $options['printable']

2) I have JavaScript on my home page that randomly cycles through products in my catalog, showing them off. I wanted the customer to be able to click on these images and be taken to the corresponding product. But, I did not have an easy way in JavaScript to translate the SKU (which is what I used to name the images) to productid values. So, I added the following line as the first code line in the same function:
if ( ($options['productid']=="1") && $options['sku']){
$options['productid'] = func_query_first_cell("SELECT productid
FROM $sql_tbl[products]
WHERE productcode = '".$options['sku']."'");
}

In my system, there is no product with a productid of "1", so, if one is requested, this code uses the sku to lookup the correct productid in the db. This way I could have all my auto-generated images have anchor tags to product.php?productid=1&sku=<sku number>

Works like a charm.
(I'm in the final stages of testing, but you are welcome to see it at www.miniature-giant.com )

Hope the above makes sense -- if not, let me know and I'll elaborate,
Thanks,
James

Miniature-Giant 11-20-2006 08:27 AM

Re: XC SEO v1.1.0 Released
 
Opps, sorry, I also had to add the following line to the function seo_filter():

$this->_sku_prefix = $this->_name_delim.'sku'.$this->_name_delim;

to define the url text. Now my url look like, e.g.,
http://www.miniature-giant.com/sophie-the-succubus-Reaper-sku-1406-pr-10.html or
http://www.miniature-giant.com/grim-reaper-and-tombstone-72mm-Reaper-sku-1414-pr-18.html

Sorry for missing that edit in my previous post,
James

teddychan 11-20-2006 10:20 AM

Re: XC SEO v1.1.0 Released
 
is it a bugs?

I just installed the koaconsulting.com mulit currency mode.

it pass the variable : currency_code=XXX
to the URL.

I can show the correct currency in home.php
or https page, when the seo is auto off.

while in all other http page, which seo is on.

i can't show the correct currency.

any idea?

Miniature-Giant 11-20-2006 10:47 AM

Re: XC SEO v1.1.0 Released
 
"is it a bugs?"

No, none that I am aware of. I was adding a custom feature to my system to also have the sku listed in the html url.

Miniature-Giant 11-21-2006 04:31 AM

Re: XC SEO v1.1.0 Released
 
I'm a bit confused here (thought this was completely working -- maybe I was mistaken).

I have this mod installed, and it is working almost everywhere ... here is my problem:

On my home.php page I have dynamically loaded images to products. The href for these images is reloaded through javascript using the getElementById(), e.g.,

eval("document.getElementById('SE_Anchor"+i+"').hr ef = 'product.php?productid=1&amp;sku="+imageNum+"';");

For example, for imageNum=3000, this dynamically reassigns the href to "product.php?productid=1&sku=3000".

If I place this on the page as a hard anchor: <a href="product.php?productid=1&sku=3000">test</a> then it correctly gets translated to: http://www.miniature-giant.com/kyra-and-lavarath-Reaper-sku-3000-Dark-Heaven-Legends-DHL-pr-1020.html
But if I dynamically reassign the href (as above), then:
1) in the status bar, it shows the "product.php?productid=1&sku=3000" link
2) if clicked, in the address bar, it shows the html version (shown above).

Is this a problem for the spiders? I mean, will I not get credit for the link as an html link on the home page? Will the spiders count it somehow as duplicate content (since two "links" resolve to the same content, i.e., the php & the html urls)?

I "thought" that the status bar was showing the html link for these dynamic links yesterday -- maybe not, been a very long, um, 6 months.

Thanks for any insights,
James

intel352 11-21-2006 01:36 PM

Re: XC SEO v1.1.0 Released
 
teddychan, the currency mod that you have enabled is not supported by XC SEO. you would have to modify the source code to enable support of that currency mod, or I can find an alternative solution for you when I have time

Miniature giant, i've been thinking about using SKU instead of ProductID for awhile now (and I lament the fact that I did not use skus originally...). you could actually replace the productid usage with the sku usage, which would reduce needless fluff in your rewritten url (i've found many users often search google using a sku, which would be better to have in your url than a productid)

Additionally, regarding your issue with urls in the javascript:
#1. if I remember correctly, urls aren't being rewritten in the javascript, to prevent unforeseen issues with the myriad javascript functions in x-cart
#2. when a user visits your product.php url, they are being 301-redirected to the proper HTML url. I don't know about google specifically, but search engines typically do not have javascript enabled. even if they did, and if they visited the .php url, you might not gain points for pointing to a page deep in your site, but i don't see why you would get penalized for duplicate content, since a 301-redirect exists.

You would get penalized for duplicate content if XC SEO didn't redirect users from the product.php url :-) (which, btw, i believe the commercial xcart seo mods don't redirect from the old php urls, so their customers are starting to get penalized)

Miniature-Giant 11-23-2006 01:19 AM

Re: XC SEO v1.1.0 Released
 
Thanks for the reply.
The XC SEO appears to be working, in that I see the html in the status (non-JavaScript links), and they resolve correctly. However,...
I installed a siteMap generator yesterday (specifically, XML-SiteMapsGenerator from SafetyNetWeb) and ran it on my site. After many hours (still not done), I have been scanning the resultant, partial, sitemap. I note many different links to the same content, e.g.,:
http://www.miniature-giant.com/urban-legend-sophie-72mm-Reaper-sku-1504-Special-Edition-SE-c-410-p-1-pr-20.html
http://www.miniature-giant.com/urban-legend-sophie-72mm-Reaper-sku-1504-Special-Edition-SE-c-410-p-2-pr-20.html
The product name, short description title, sku, category, and product number match. These two html links are to the same product page. However, the "p-#" is different. This product happens to be on the second page of a category that is presented on two pages. This appears to indicate that there are links to this product on each of the two pages. I tried scanning for another sku (7001), which is in a different category:

http://www.miniature-giant.com/mark-iv-specter-Reaper-sku-7001-Combat-Assault-Vehicle-CAV-c-249-p-1-pr-1240.html
http://www.miniature-giant.com/mark-iv-specter-Reaper-sku-7001-Combat-Assault-Vehicle-CAV-c-249-p-12-pr-1240.html
http://www.miniature-giant.com/mark-iv-specter-Reaper-sku-7001-Combat-Assault-Vehicle-CAV-c-249-p-8-pr-1240.html
http://www.miniature-giant.com/mark-iv-specter-Reaper-sku-7001-Combat-Assault-Vehicle-CAV-c-249-p-9-pr-1240.html
http://www.miniature-giant.com/mark-iv-specter-Reaper-sku-7001-Combat-Assault-Vehicle-CAV-c-249-p-5-pr-1240.html
This category (#249) is spread across 12 pages. It is possible that when the sitemap generator is done, it will "find" links to this product on all 12 pages of the category.
Of course, this product is only linked to on one of the pages (#1). I assume that this would result in the search engines slamming me for multiple content, even though (or perhaps because) these html links all resolve to the same "real" page.
My thought, based on your reference in your last reply, is to remove the "-p-#-pr-#" from the html links. However, since I'm not sure how exactly this php>html>page is working, I wasn't sure if I would need to modify additional code in, say, products.php to accomodate the absence of the "p" and "pr" values. For example, modify the code to use the sku value to lookup the product in the db. Or, perhaps, the "real" parameter passing is still occuring behind the scenes and the form of the html text that is desplayed is irrelavant.
Is this a multiple content problem?
Can I simply remove the "p" and "pr" references from the html links, or will I have to modify the php code to use the sku instead?
Does another/simplier way to resolve this problem come to mind?
I'm very interested in any thoughts on this matter.
--James
P.S. I also noticed that many products had both a "normal" html link and a "printable" link. When I surf to these two html links, they are of the same product, but have somewhat different content (missing nav bars, graphics, etc.). Would this cause a "multiple content" problem or no? Again, thanks!

Miniature-Giant 11-23-2006 01:37 AM

Re: XC SEO v1.1.0 Released
 
In digging through the code, I think that I understand what is happening, though I am still at a loss as to how best to resolve it.
I believe:
#1) that since each catalog page contains a link to the other pages in that category (at the top and bottom of the catalog page), and
#2) since a product is either on the current catalog page OR on one of pages linked to by these category page links, then
#3) each page of a category's catalog has either a direct link to the product, or a secondary link to the same product, and
#4) the XC SEO is using the "p" value corresponding to the catalog page that has the redirect, not the catalog page that the product is truely on.
Any ideas?

Also, if a product is in more than one category, will this also cause multiple html links due to the presence of the category number in the html links?

intel352 11-23-2006 03:52 AM

Re: XC SEO v1.1.0 Released
 
You are correct in your analysis, except regarding "duplicate content". If I had implemented this mod without any thought towards avoiding duplicate content, then I would agree with you that this would definitely lead to duplicate content.

As it stands, the mod smartly displays only urls that a search engine should see (to the search engine). additionally, if a search engine happened to find this url:
http://www.miniature-giant.com/mark-iv-specter-Reaper-sku-7001-Combat-Assault-Vehicle-CAV-c-249-p-1-pr-1240.html

then XC SEO would redirect the search engine to:
http://www.miniature-giant.com/mark-iv-specter-Reaper-sku-7001-Combat-Assault-Vehicle-CAV-pr-1240.html

What I normally do to test, is go into bots.php, at the bottom, the variables that are being set regarding bots? set them all to true or Y or whatever the appropriate values would be (you'll have to look at the code). This will make everyone evaluate as a bot (so hopefully your website isn't live yet). Then you can go through your site and see how you (as a bot) are treated by XC SEO.

If you still find discrepancies, please let me know

Miniature-Giant 11-23-2006 04:03 AM

Re: XC SEO v1.1.0 Released
 
Sounds promissing.
But, if I submit a site-map to Google that contains both of those html urls (p1 & p2), will Google then just follow the site-mapped urls and see duplicate content?
If so, then perhaps this is a problem with the site map generator that I bought.
Thoughts? Thanks,
James

Miniature-Giant 11-23-2006 04:09 AM

Re: XC SEO v1.1.0 Released
 
OPPS -- MY MISTAKE
The

Miniature-Giant 11-23-2006 04:11 AM

Re: XC SEO v1.1.0 Released
 
OPPS - MY MISTAKE (and clumbsy fingers)

The site map generator I purchased was from "XML-Sitemaps.com" and NOT from "SafetyNetWeb" -- sorry for any confusion to anyone!!

If the problem is that my site map generator is not correctly following links as if it were a robot/spider -- perhaps I should chuck this software and use another that is more compatible with your SEO.

Any suggestions? I'm all ears!

Thanks,
James

Miniature-Giant 11-23-2006 05:27 AM

Re: XC SEO v1.1.0 Released
 
I forumed XML-Sitemaps for some input on this problem, with the following question: "Is there a way to make XML-Sitemaps scan my site as a spider would, so that the php code that I have that acts uniquely for spiders will be employed?"

Their reply was: "The xml sitemaps script does act in the same way as robots/spiders. The way it works is that it will scan all pages for links and follow them just the same as a search engine spider would. For it to pick up links they must exist somewhere on your pages."

Any help in the problem would be much appreciated.
James

Miniature-Giant 11-23-2006 05:42 AM

Re: XC SEO v1.1.0 Released
 
I ran the "bots.php" test that you suggested.
It DOES show html links without the page numbers.
So, it looks like they are probably wrong about their code.
Still leaves me without a site map generator.
I will try setting the number of products per page so high that I don't get any multiple pages in any categories -- but it still leaves me a bit uneasy about their code. Any suggestions or recommendations?
Thanks,
James


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

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