Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

XC SEO v1.1.0 Released

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #391  
Old 02-03-2008, 01:03 AM
 
amadecs amadecs is offline
 

Member
  
Join Date: Jan 2008
Posts: 20
 

Default Re: XC SEO v1.1.0 Released

Ok, so it's 1:30am, and I'm having some trouble with the XC SEO module. I've been trying to figure this out for a few hours now, and I just can't seem to find a solution. I'm starting to think that it's a problem on my server, but I could be wrong. So here is my setup:

I have xcart installed in it's own subdirectory. This is the filepath: public_html/xcart/.

I installed the mod without any troubles, and it's showing up in the modules section of my admin panel. I checked my database and it looks good too. No duplicates or missing fields.

I uploaded all of the XC SEO files onto my server keeping the same file structure.

I did a copy and paste of both the (main) .htaccess and (catalog) .htaccess files into my existing .htaccess files. The main .htaccess is located at: public_html/xcart/.htaccess.

This is what it looks like:

Quote:
Options +FollowSymLinks
RewriteEngine On

DirectoryIndex index.html index.php

#####
# The following rules should be added
# to the TOP of your existing .htaccess file
# to prevent malicious users/bots from accessing
# x-cart files that aren't meant to be public.
#####

# 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)$

# block access to the 'Smarty-*' directory
RedirectMatch gone ^.*Smarty.*$

# block common X-Cart files that could reveal
# that you have X-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 /skin1_original
Redirect gone /skin1_original

# block access to /skin1
Redirect gone /skin1

# 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 access to the pgp directories
Redirect gone /tmp
Redirect gone /var

# 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} ^YOURDOMAIN.com [NC]
#RewriteRule ^(.*)$ http://www.YOURDOMAIN.com/$1 [R=301,L]

##### XC SEO
# 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&ca t=$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&ca t=$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&ca t=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-(productcode|title|price|orderby)-down-c-([0-9]+)\.html$ $1home.php?printable=Y&sort=$2&sort_direction=1&ca t=$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_direc tion=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_direc tion=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&manuf acturerid=$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&manuf acturerid=$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_direc tion=0&manufacturerid=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-print-(productcode|title|price|orderby)-down-m-([0-9]+)\.html$ $1manufacturers.php?printable=Y&sort=$2&sort_direc tion=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&manuf acturerid=$3 [QSA,L]
RewriteRule ^([^/]*/)?[^/]+-(productcode|title|price|orderby)-down-m-([0-9]+)\.html$ $1manufacturers.php?sort=$2&sort_direction=1&manuf acturerid=$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


I played around with the RewriteBase to no avail. I even moved the .htaccess file up one level to the root directory, but still nothing happened. I do have another .htaccess file at the root level for various 301's etc...

My site was custom designed, but the overall structure remains the same. The only thing that I am certain of being different is that instead of skin1_orginal, we created another folder called skin1 to hold our templates and other design elements.

Any help would be much appreciated. I'll see how late I can stay up, and hopefully figure this thing out.
__________________
X-Cart: Version 4.1.9
Apache: Version 1.3.39 (Unix)
PHP: Version 5.2.4
Reply With Quote
  #392  
Old 02-03-2008, 02:37 AM
 
amadecs amadecs is offline
 

Member
  
Join Date: Jan 2008
Posts: 20
 

Default Re: XC SEO v1.1.0 Released

Wow! I can't believe this!

After two hours of trouble shooting, I found the problem, and I'm embarrassed to even say it.

I forgot to modify the auth.php file.
__________________
X-Cart: Version 4.1.9
Apache: Version 1.3.39 (Unix)
PHP: Version 5.2.4
Reply With Quote
  #393  
Old 02-03-2008, 07:31 PM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: XC SEO v1.1.0 Released

haha, I've had similar situations happen to me before as well

sorry to hear about your trouble, glad you found the solution!


XC SEO's install routine used to be simple, but now has gotten overly complex due to the need for a complete installation rewrite. I also need to release a patch-file of changes as an alternative to the find/replace method. I hope to have these issues addressed in the next release.

Cheers!
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #394  
Old 02-18-2008, 07:23 AM
 
amadecs amadecs is offline
 

Member
  
Join Date: Jan 2008
Posts: 20
 

Default Re: XC SEO v1.1.0 Released

Quote:
haha, I've had similar situations happen to me before as well

sorry to hear about your trouble, glad you found the solution!


XC SEO's install routine used to be simple, but now has gotten overly complex due to the need for a complete installation rewrite. I also need to release a patch-file of changes as an alternative to the find/replace method. I hope to have these issues addressed in the next release.

Cheers!

Thanks Jon, it wasn't fun, but I'll tell you what. I can install this mod with my eyes closed now.


I also have question for anyone that has been using XC SEO. I've noticed one problem, that kind of concerns me with the auto-gen nature of the links. Say for instance, I decide to change the category or product name for one of my pages. Since that URL is being created using the above mentioned fields in the database, then my URL is going to change as well. Which in turn will lead to a broken link or duplicate content issue in the SERP's.

I know that I can just 301 the old URL to the new one, but I'm wondering for those of you that have a huge database of products, has this become a tedious job for you? I can't imagine that it would be fun having to continuously update your .htaccess file everytime you decide to change the productname. Anyone have a workaround? Besides going with CD SEO?
__________________
X-Cart: Version 4.1.9
Apache: Version 1.3.39 (Unix)
PHP: Version 5.2.4
Reply With Quote
  #395  
Old 02-18-2008, 08:23 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: XC SEO v1.1.0 Released

changing the product title (and thus, the url) doesn't not result in errors or dup content. XC SEO checks the url and issues a 301 redirect automatically.

test it yourself, visit an existing product url of yours, then in a different browser tab/window, change the product title, and then refresh the product page itself, you'll see the url change. if it doesn't, let me know
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #396  
Old 02-19-2008, 10:15 PM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: XC SEO v1.1.0 Released

XC SEO v1.3.0 HAS BEEN RELEASED
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #397  
Old 03-28-2008, 12:01 PM
 
amadecs amadecs is offline
 

Member
  
Join Date: Jan 2008
Posts: 20
 

Default Re: XC SEO v1.1.0 Released

I have a question about the security issues that are in place foe XC SEO. There is a secure.htaccess file that comes with the module. It includes the following code...

Quote:
#####
# The following rules should be added
# to the TOP of your existing .htaccess file
# to prevent malicious users/bots from accessing
# x-cart files that aren't meant to be public.
#####

# 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)$

# block access to the 'Smarty-*' directory
RedirectMatch gone ^.*Smarty.*$

# block common X-Cart files that could reveal
# that you have X-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 /skin1_original
Redirect gone /skin1_original

# 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 access to the pgp directories
Redirect gone /tmp
Redirect gone /var

Now, I know that it's supposed block malicious bots and users, but it's actually blocking complete access regardless.

For example here is an image in my xcart subdirectory that doesn't have the secure.htaccess file:
http://www.expresscomputersystems.com/xcart/skin1/images/hdr_mnu_networking_out.jpg

Now here is the same Url minus the xcart directory where the secure.htaccess file is located.
http://www.expresscomputersystems.com/skin1/images/hdr_mnu_networking_out.jpg

So right now I'm using all of the images in my xcart/skin1 directory as opposed to the ones in my skin1.

Anybody else have this problem?
__________________
X-Cart: Version 4.1.9
Apache: Version 1.3.39 (Unix)
PHP: Version 5.2.4
Reply With Quote
  #398  
Old 03-28-2008, 12:23 PM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: XC SEO v1.1.0 Released

the wording in the top of the file is incorrect if you want to get technical. the idea is that nobody should have access to those files/directories, and typically only malicious users/bots would try to access those files.

regardless, those rules should *not* be affecting the image that you're referencing. If you'd like, contact me via PM or email with your FTP info, I'll find out what is causing the problem.

Cheers
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #399  
Old 05-04-2008, 02:55 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: XC SEO v1.1.0 Released

XC SEO [basic] v1.4.0 Released -- X-Cart 4.0 and 4.1 supported
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #400  
Old 09-17-2008, 07:27 AM
 
g053584398 g053584398 is offline
 

Newbie
  
Join Date: Jun 2006
Posts: 9
 

Default Re: XC SEO v1.1.0 Released

Has anyone successfully installed XC SEO 1.4.0 (rev 60 - May 4, 200 with X-Cart version 4.1.2? Does anyone know why the patch for 'froogle.php' and 'get_language.php' did not patch successfully?

When attempting to apply the patch 'xcseo_41.patch' with X-Cart version 4.1.2, the following information was returned:

Step 1 of 2: Testing patch applicability and generation list of files

Result of the testing phase..

auth.php OK
modules/Froogle/froogle.php could not patch
https.php OK
include/install.php OK
include/get_language.php could not patch
__________________
D.G.

X-Cart Gold 4.1.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:32 PM.

   

 
X-Cart forums © 2001-2020