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)

just wondering 02-12-2007 07:19 AM

Re: XC SEO v1.1.0 Released
 
I'm using BCSE's Ad / Banner Mod. The Banners it displays are clickable so I can direct customers to a specific part of my or any other site.

However, if I click on one, I get the following error:
Code:

Warning: parse_url(/shop/ad_banner_click.php?banner_id=16&banner_redirect=http://www.simplywellpriced.co.uk/shop/1-penny-item-one-c-1-p-1-pr-30.html) [function.parse-url]: Unable to parse url in /home/uumlfvno/public_html/shop/modules/XC_SEO/seo.php on line 10
& then takes me to the item.

Any ideas why I get this?

MallRomania 02-23-2007 06:47 AM

Re: XC SEO v1.1.0 Released
 
Hello

Intel352, thank you very much for sharing your work. I have a small question: it is possible to have categories/manufacturers name included in product link, for example: http://www.website.com/category/product.html or http://www.website.com/category/manufacturer/product.html?

Thanks

economedical 02-27-2007 06:51 AM

Re: XC SEO v1.1.0 Released
 
I installed this, followed all the instructions but now it redirects all the products to html pages and gives me a 404 page not found error, any advice?

bebekisses.com 02-27-2007 07:16 AM

Re: XC SEO v1.1.0 Released
 
make sure you place your .htaccess file dude.

economedical 02-27-2007 05:00 PM

Re: XC SEO v1.1.0 Released
 
OK here is the .htaccess file that I added the two blocks of text to from the package. My store is in the root, my .htaccess is in the root.
Code:

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 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

Options +FollowSymLinks

# 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 Lite
# Rewrite SEO category URL's

# Rewrite SEO manufacturers URL's

# Rewrite SEO product URL's

# Rewrite SEO static page URL's

# Rewrite SEO search URL's
##### / XC SEO Lite


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://economedical.com.au/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://economedical.com.au$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.economedical.com.au/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.economedical.com.au$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.rgmedicalnsw.com.au/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.rgmedicalnsw.com.au$      [NC]
RewriteRule .*\.([^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/)$ - [F,NC]


bebekisses.com 02-27-2007 05:16 PM

Re: XC SEO v1.1.0 Released
 
uncomment: RewriteBase /

I had to do that to get rid of the 404's :(

bebekisses.com 02-27-2007 05:19 PM

Re: XC SEO v1.1.0 Released
 
Just noticed the redirect gone's. I'm using this!! :)
#####
# 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

economedical 02-27-2007 05:28 PM

Re: XC SEO v1.1.0 Released
 
I have tried with and without the commented rewritebase but same both ways, which is why i thought it must be some sub directory thing, but root is root...

Those redirect gones are the same as mine - comparing them side by side in a spreadsheet, they look similar...

Took out the comments and removed these pesky single spaces at end of each line just in case, who knows, still no go.

Code:

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 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

Options +FollowSymLinks

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

##### XC SEO Lite
# Rewrite SEO category URL's

# Rewrite SEO manufacturers URL's

# Rewrite SEO product URL's

# Rewrite SEO static page URL's

# Rewrite SEO search URL's
##### / XC SEO Lite


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://economedical.com.au/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://economedical.com.au$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.economedical.com.au/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.economedical.com.au$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.rgmedicalnsw.com.au/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.rgmedicalnsw.com.au$      [NC]
RewriteRule .*\.([^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/)$ - [F,NC]

Code:

The webpage cannot be found ***http://www.economedical.com.au/littmann-classic-ii-se-stethoscope-pr-1233.html***
 HTTP 404 
  Most likely causes:
There might be a typing error in the address.
If you clicked on a link, it may be out of date.
 
  What you can try:
    Retype the address. 
 
    Go back to the previous page.
 
    Go to www.economedical.com.au and look for the information you want. 
 
    More information

This error (HTTP 404 Not Found) means that Internet Explorer was able to connect to the website, but the page you wanted was not found. It's possible that the webpage is temporarily unavailable. Alternatively, the website might have changed or removed the webpage.

For more information about HTTP errors, see Help.


bebekisses.com 02-27-2007 05:43 PM

Re: XC SEO v1.1.0 Released
 
I see from your post that the Manufacturer, category rewrite rule are missing.
Code:

options +FollowSymLinks
RewriteEngine On

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

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


Try this.

economedical 02-27-2007 08:13 PM

Re: XC SEO v1.1.0 Released
 
That fixed it, those missing rewriterules arent in the .htaccess file in the zip i downloaded, and I am glad you gave em to me cos I would have been bald trying to do it myself. Thanks heaps!


All times are GMT -8. The time now is 02:05 AM.

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