Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo


Recommended Posts

That function hasn't been used since before version 2.2d-8. The last version I uploaded was 2.2d-13. So if your version has ereg in it, you've got more problems than that and you should upgrade to the latest version.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Just been debuging before I forget

Notice: Undefined variable: seo_urls in /home/xxxxx/public_html/xxxxx/includes/application_top.php on line 293

when report all PHP errors  is turned on the instructions for application_top.php should be I believe

// Ultimate SEO URLs v2.2d
 if ((!defined(SEO_ENABLED)) || (SEO_ENABLED == 'true')) {
   include_once(DIR_WS_CLASSES . 'seo.class.php');
   $seo_urls = ''; // Set the $result variable
   if (!is_object($seo_urls)){
   $seo_urls = new SEO_URL($languages_id);
     }
   }

maybe Jack could verify .

 

Regards

Joli

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Notices are generally not worth bothering with. Technically, a variable is supposed to be declared before it is used if it is going to be used in other places. So if you change the code to the following, it should remove the notice.

// Ultimate SEO URLs v2.2d
 $seo_urls = '';
 if ((!defined(SEO_ENABLED)) || (SEO_ENABLED == 'true')) {
   include_once(DIR_WS_CLASSES . 'seo.class.php');
   $seo_urls = ''; // Set the $result variable
   if (!is_object($seo_urls)){
   $seo_urls = new SEO_URL($languages_id);
     }
   }
Edited by Jack_mcs

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I have an oscommerce site at : http://www.stirnpanzer.com with ulitimate seo's

i have created another in a sub directory "bbs" http://www.stirnpanzer.com/bbs

Just installed ultimate seo to the one in the /bbs/ directory and created the htaccess file below .... but i am still landing on the wrong page....?

Can someone assist ?

 

thanks

 

#
# $Id$
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

#<IfModule mod_setenvif.c>
#  <IfDefine SSL>
#    SetEnvIf User-Agent ".*MSIE.*" \
#             nokeepalive ssl-unclean-shutdown \
#             downgrade-1.0 force-response-1.0
#  </IfDefine>
#</IfModule>
# Make php 5
# AddType x-mapp-php5 .php 2/6/2013

AddHandler x-mapp-php5 .php .php4  
#
# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter

# AcceptPathInfo On

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)

# php_value session.use_trans_sid 0
# php_value register_globals 1
# Begin Ultimate SEO V2.2d
Options +FollowSymLinks
RewriteEngine On

  # RewriteBase instructions
  # Change RewriteBase dependent on how your shop is accessed as below.
  # http://www.mysite.com = RewriteBase /
  # http://www.mysite.com/catalog/ = RewriteBase /catalog/  
  # http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/

  # Change the following line using the instructions above  
 
RewriteBase /bbs/

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING}
# End Ultimate SEO V2.2d

Link to comment
Share on other sites

I went to the bbs site and clicked on the aviator jacket. It took me to the main site. That means the configure file is not setup correctly for the bbs site. See this thread on how to set it up.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for the reply.

Have looked at the thread and still can't spot the issue.

 

<?php
  define('HTTP_SERVER', 'http://www.stirnpanzer.com');
  define('HTTPS_SERVER', 'http://www.stirnpanzer.com');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '');
  define('HTTPS_COOKIE_DOMAIN','');
  define('HTTP_COOKIE_PATH', '/bbs/');
  define('HTTPS_COOKIE_PATH', '/bbs/');
  define('DIR_WS_HTTP_CATALOG', '/bbs/');
  define('DIR_WS_HTTPS_CATALOG', '/bbs/');
  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

  define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
  define('DIR_FS_CATALOG', '/homepages/14/d211321978/htdocs/bbs/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

  define('DB_SERVER', 'mydbname.myhost.com');
  define('DB_SERVER_USERNAME', 'myusername');
  define('DB_SERVER_PASSWORD', 'mypassword');
  define('DB_DATABASE', 'mydbname');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');
?>

Link to comment
Share on other sites

Yes a different file in the root, the only difference being = RewriteBase /

 

See file :

 

#
# $Id$
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

#<IfModule mod_setenvif.c>
#  <IfDefine SSL>
#    SetEnvIf User-Agent ".*MSIE.*" \
#             nokeepalive ssl-unclean-shutdown \
#             downgrade-1.0 force-response-1.0
#  </IfDefine>
#</IfModule>
# Make php 5
# AddType x-mapp-php5 .php 2/6/2013

AddHandler x-mapp-php5 .php .php4  
#
# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter

# AcceptPathInfo On

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)

# php_value session.use_trans_sid 0
# php_value register_globals 1
# Begin Ultimate SEO V2.2d
Options +FollowSymLinks
RewriteEngine On

  # RewriteBase instructions
  # Change RewriteBase dependent on how your shop is accessed as below.
  # http://www.mysite.com = RewriteBase /
  # http://www.mysite.com/catalog/ = RewriteBase /catalog/  
  # http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/

  # Change the following line using the instructions above  
 
RewriteBase /

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING}
# End Ultimate SEO V2.2d

Link to comment
Share on other sites

Then you've stumped me. :) Everything appears to be correct so this is one of those problems can't be fixed in a support thread.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Strange not seeing this at all click on aviator jacket takes me to

 

http://www.stirnpanzer.com/bbs/product_info.php?products_id=2

 

which is as it should be were this links hardcoded  in index.php and now corrected ?

 

Regards

Joli

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Hi guys,
after a couple of years I tried to install a new shop and searched for some tools. I installed this add on and turned on KissER Error Handling & Debugging to hunt some errors and some errors occured.

First error:

Error: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

File: includes/classes/seo.class.php

Line: 78

 

This error does not affect anything. Everything, as far as I can evaluate, works fine.

 

To kill this error I went to seo.class.php line 78 and changed:

 

$this->link_id = mysql_connect($this->host, $this->user, $this->pass);

to

$this->link_id = mysqli_connect($this->host, $this->user, $this->pass);

 

No big deal for me, but after another refresh chit got real:

 

Script does not work, you can navigate through the shop but no seo link products and categories!

 

Error: mysql_select_db(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

File: includes/classes/seo.class.php

Line: 88

 

Error: mysql_insert_id(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

File: includes/classes/seo.class.php

Line: 138

 

Error: mysql_num_rows() expects parameter 1 to be resource, null given

File: includes/classes/seo.class.php

Line: 128

 

Error: mysql_free_result() expects parameter 1 to be resource, null given

File: includes/classes/seo.class.php

Line: 149

 

Error: mysql_insert_id(): Access denied for user ''@'localhost' (using password: NO)

File: includes/classes/seo.class.php

Line: 138

 

Error: mysql_query() expects parameter 2 to be resource, object given

File: includes/classes/seo.class.php

Line: 99

 

Above errors occur a couple of times.

 

System:

osCommerce 2.3.4

php: 5.5.18

mysql: 5.6.21

 

Kind regards

 

Link to comment
Share on other sites

Hi,

I have installed Ultimate SEO URL by Chemo 2.2

I need to change the URL Separator to '/' from '-' what should be done and where, please help me ASAP....

Please reply me, as i need help sincerely.
 
I have seen most of the pages in this thread but was unable to find it, if you guys can help me it will be great full.

Thanks in Advance.Report
  •  
  •  
Link to comment
Share on other sites

Changes like what you want aren't something that is covered in a support thread like this since it is a change you want, not anything wrong with the addon. So you're on your own in finding a solution or you would need to pay someone to make the change for you.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 3 weeks later...

Well the contribution works with the hyphen as seperator between the categorynames and the productnames. So the urls are as follows:

www.exampleshop.com/category-subcategory-product-p-1234.html

 

I've rewritten it so it uses the forward slash as separator between the categorynames and the productnames. The url in my shop is now like this:

www.exampleshop.com/category/subcategory/product-p-1234.html

Piemol can you can tell me how to make these changes?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...