Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

Hi - we have 2.1 installed. Noticing that clicking on a URL that contains ampersands (&) such as pagination URLs cause a redirect error. So this example:

 

http://mysite.com/kitchen-coffeetea-c-1_236.html?page=2&sort=2a

 

Redirects to this:

 

http://mysite.com/kitchen-coffeetea-c-1_236.html?amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;page=2&sort=2a

 

And generates an error in Firefox:

 

The page isn't redirecting properly

 

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

 

Any ideas?

Link to comment
Share on other sites

Can someone help me with my SEO URLS?

 

http://hanmaro.denniskallansee.nl/

 

Some pages work, some don't

 

http://hanmaro.denniskallansee.nl/accessoires-c-25.html = 404

http://hanmaro.denniskallansee.nl/ = working

http://hanmaro.denniskallansee.nl/pages.php?page=Moeite%20met%20kiezen?%20Cadeaubon. = working, because it's not being translate

 

I got oscommerce 2.2MS version and this is my .htaccess

 

# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $
#
# 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>

# 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)
#
#<IfModule mod_php4.c>
#  php_value session.use_trans_sid 0
php_value register_globals 1
#</IfModule>


# 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

 

I hope somebody can help me

Link to comment
Share on other sites

 

I hope somebody can help me

 

RewriteBase is correct which is the usual problem so it would suggest to me that apache is not compiled with the module mod_rewrite.

 

I am presuming that it is a Unice and not an IIS server.

Link to comment
Share on other sites

An update, i did a clean install of 2.2rca and now it works: http://hanmaro.denniskallansee.nl/hardware-c-1.html. Seems something was wrong with the shop, i got a PHP REGISTER GLOBALS warning in my other post. The register globals where off and should be on or something. 2.2rca shows me register globals are off (which is true on my server and has a green check). I don't know but maybe that has something to do with it?

 

Now i hope i can migrate databases from 2.2MS to 2.2rca

Link to comment
Share on other sites

I got another question (i finally got it working). I don't know why i didn't work at first but at least now it works (did a clean ms2 install and imported DB).

Oke so far so good.

 

 

http://hanmaro.denniskallansee.nl/ works

http://hanmaro.denniskallansee.nl/pages.php?page=Ophaal%20adres but is not rewritten.

 

Now i found this in the .htaccess

 

RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}

 

I thought when i change info_pages into pages it should work, but it didn't. Now i am not a real .htaccess expert so how can i make pages.php?page=blalba to a SEO URL too?

Link to comment
Share on other sites

Hi

i got a problem with this contribution Ultimate SEO URLs v2.2d , i installed it on Oscommerce 2.2 RC2a

if i copy and past an URL to an other browser, or if i click from google to a product description link of my site, i get:

 

ERROR!

Unable to determine the page link!

 

How can i fix it?

I think the problem is on includes/function/html_output.php but im not sure...

 

im using php v5.2.10 , i added in the file .htaccess :

 

php_flag register_globals On

php_value register_long_arrays On

 

but nothing change... i tried also to disable the SEO Url from the admin but nothing change...

any solution?

Edited by Aperol
Link to comment
Share on other sites

I got another question (i finally got it working). I don't know why i didn't work at first but at least now it works (did a clean ms2 install and imported DB).

Oke so far so good.

 

 

http://hanmaro.denniskallansee.nl/ works

http://hanmaro.denniskallansee.nl/pages.php?page=Ophaal%20adres but is not rewritten.

 

Now i found this in the .htaccess

 

RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}

 

I thought when i change info_pages into pages it should work, but it didn't. Now i am not a real .htaccess expert so how can i make pages.php?page=blalba to a SEO URL too?

The contribution should work the page manager contribution, which is what that is. I have it setup here and it is working fine. Be sure youhave the latest version installed - 2.2d_11

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

but nothing change... i tried also to disable the SEO Url from the admin but nothing change...

any solution?

Be sure you are using the latest version of this contribution. If nothing else, you should be able to turn it off in admin so the fact that you can't means you either have an old version installed or there is something wrong with your installation.

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

Hello,

Can someone help me with my SEO URLS?

 

It worked wonderfully till when i got some products naming "product C class" or "P class product" and some categories named "category C"

 

the rewrited url is

http://mysite.com/my-product-c-class-p-7880.html

or

 

everything goes to 404 page because i think there is confusion between category and product name.

 

i try to change my .htaccess by changing

RewriteRule ^(.*)-pa-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-ca-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-ma-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

 

but it still not works ;(

 

 

 

I got oscommerce 2.2MS version and this is my .htaccess

 

 

# 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

 

 

I hope somebody can help me

SEO Addons : Header Tags SEO - Ultimate SEO V 2.2d

Link to comment
Share on other sites

Hello,

Can someone help me with my SEO URLS?

 

It worked wonderfully till when i got some products naming "product C class" or "P class product" and some categories named "category C"

 

everything goes to 404 page because i think there is confusion between category and product name.

 

i try to change my .htaccess by changing

but it still not works ;(

Yes, you are correct. There is a conflict between how the code works and the extra -c and -p in the urls. If you want to change the .htaccess file to handle that, you will also need to edit the includes/classes/seo.class.php file and change any reference to -c- and -p- to the new code. Be sure it isn't one already used though.

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

Yes, you are correct. There is a conflict between how the code works and the extra -c and -p in the urls. If you want to change the .htaccess file to handle that, you will also need to edit the includes/classes/seo.class.php file and change any reference to -c- and -p- to the new code. Be sure it isn't one already used though.

 

Hi Jack !

this is what i thought about.

i change -c- to -c2-

 

in .htaccess

 

RewriteRule ^(.*)-c2-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

i find at least 7 times -c-'s reference (except comments) but it seems that i can not change all the 7 !

if i did it there is a redirection to "never end"

 

only these 3 for which change can be accepted in seo.class.php

 

line 627 ---> 'cPath' => '-c2-',

line 2596 --> if (($pStart = strpos($u1, "-c2-")) !== FALSE) { //start isolating the ID - only for categories

line 2632 --> if (($pStart = strpos($u1, "-c2-")) !== FALSE) { //start isolating the ID - only for categories

 

 

what about the other one ? i don't understand why i cannot change.

line 2612 --> if (strpos($this->attributes['SEO_REDIRECT']['URI_PARSED']['path'], '-c-'.$actualPath) !== FALSE) { //this is the actual url

line 2648 --> if (strpos($this->attributes['SEO_REDIRECT']['URI_PARSED']['path'], '-c-'.$actualPath) !== FALSE) { //this is the actual url

line 2730 --> else if (($pStart = strpos($this->uri_parsed['path'], "-c-")) !== FALSE) {

line 2766 --> $this->uri_parsed['path'] = $cName . "-c-" . $cID . ".html";

 

for the time being, it seems that the rewrite works but not for the pop-up image in the products page....

 

i continue to investigate, but if you have any idea about... it would be helpful

 

thanks

SEO Addons : Header Tags SEO - Ultimate SEO V 2.2d

Link to comment
Share on other sites

what about the other one ? i don't understand why i cannot change.

 

 

for the time being, it seems that the rewrite works but not for the pop-up image in the products page....

Be sure you have cleared the cache in the settings (or just uninstall it in admin). For the popups, they should not be allowed to list with the search engines in the first place so url's for them don't matter. If you don't have no index,no follow set for those, you should.

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

Wondering if someone can give me some advice and info...

 

I currently have creLoaded installed with CRE SEO URL installed. It doesn't seem the best and i'd like to swap to this contribution instead. I rank highly at the moment so don't want to change the URL's in any way (product pages aren't so important but category pages are a must!). Could someone tell me how the SEO URL's for this contribution are structured and changed?

 

This is how my URL's are structured currently:

 

Product pages:(468 is the product ID)

 

http://www.myURL.com/p468/Name-Of-Product/product_info.html

 

Cat 1 Tier pages:(15 is the category ID)

 

http://www.myURL.com/Category-One/c15/index.html

 

Cat 2 Tier pages:(15 is the category ID, 21 is the sub category ID)

 

http://www.myURL.com/Category-One-Sub-Category-One/c15_21/index.html

 

Any help much appreciated! :)

Link to comment
Share on other sites

..... For the popups, they should not be allowed to list with the search engines in the first place so url's for them don't matter. If you don't have no index,no follow set for those, you should.

 

hi Jack,

for sure, but problems are that people want to see a full sized image :) in the popups

SEO Addons : Header Tags SEO - Ultimate SEO V 2.2d

Link to comment
Share on other sites

I currently have creLoaded installed with CRE SEO URL installed. It doesn't seem the best and i'd like to swap to this contribution instead. I rank highly at the moment so don't want to change the URL's in any way (product pages aren't so important but category pages are a must!). Could someone tell me how the SEO URL's for this contribution are structured and changed?

You can look at my site for the structure.

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

hi Jack,

for sure, but problems are that people want to see a full sized image :) in the popups

That has nothing to do with the url or whether the popups are indexed. Adding a no index,no follow tag won't change how the popup works for your customers.

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

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

 

Hey

I am also looking for the same URL. I also want such URL for my site. Did you get solution? If so then please let me know I am stuck with this problem.

 

Your help will be highly appreciated.

Link to comment
Share on other sites

You can look at my site for the structure.

 

I'm guessing this can be changed quite easily via whatever PHP file to suit the URL structure of my site(which i can do)...but what will happen with the htaccess file and rewrites? As i'm keeping the current URL structure, will it be ok to keep my current htaccess file with the modded 'Ultimate SEO URL's' contribution? Are there any other problems changing the URL structure in the Ultimate SEO contribution may cause?

 

Thanks

Link to comment
Share on other sites

I'm guessing this can be changed quite easily via whatever PHP file to suit the URL structure of my site(which i can do)...but what will happen with the htaccess file and rewrites? As i'm keeping the current URL structure, will it be ok to keep my current htaccess file with the modded 'Ultimate SEO URL's' contribution? Are there any other problems changing the URL structure in the Ultimate SEO contribution may cause?

No, you can't use rrewrite to change the url's to your method. You can use it to change your method to what is used by this contribution.

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

No, you can't use rrewrite to change the url's to your method. You can use it to change your method to what is used by this contribution.

 

Is it possible to change the code to be compatible with my current URL structure? Any idea's where i need to change code etc?

Link to comment
Share on other sites

Is it possible to change the code to be compatible with my current URL structure? Any idea's where i need to change code etc?

Yes it is possible but you would have to rewrite a large portion of the code. You may want to look at the SEO 5 contribution. I think it creates urls similar to what you are using.

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

Yes it is possible but you would have to rewrite a large portion of the code. You may want to look at the SEO 5 contribution. I think it creates urls similar to what you are using.

 

Ok thanks, i'll take a look.

 

The SEO from cre allows 3 different URL's to be indexed or shown, which im guessing hurts my rankings a little?...

 

http://www.myurl.co.uk/tier-1-cat/c6/p142/product-title/product_info.html

 

http://www.myurl.co.uk/p142/product-title/product_info.html

 

http://www.myurl.co.uk/tier-1-category-Tier-2-cat/c6_7/p142/product-title/product_info.html

 

Do you know if this contribution or the SEO 5 one solves this problem?

 

Thanks again for the quick reply's, i appreciate it.

Link to comment
Share on other sites

  • 4 weeks later...

i did everything form your tutorial and all works ok exept my admin page where , when i try to enter it apears me on the page this:

 

 

 

// Function to reset SEO URLs database cache entries // Ultimate SEO URLs v2.2d function tep_reset_cache_data_seo_urls($action){ switch ($action){ case 'reset': case 'uninstall': tep_db_query("DELETE FROM cache WHERE cache_name LIKE '%seo_urls%'"); tep_db_query("UPDATE configuration SET configuration_value='false' WHERE configuration_key='SEO_URLS_CACHE_RESET'"); if ($action == 'reset') break; tep_db_query("DELETE FROM configuration_group WHERE configuration_group_title LIKE '%seo_urls%'"); tep_db_query("DELETE FROM configuration WHERE configuration_key LIKE 'SEO%' OR configuration_key LIKE 'USE_SEO%'"); break; default: break; } # The return value is used to set the value upon viewing # It's NOT returining a false to indicate failure!! return 'false'; }

Link to comment
Share on other sites

i did everything form your tutorial and all works ok exept my admin page where , when i try to enter it apears me on the page this:

 

 

 

// Function to reset SEO URLs database cache entries // Ultimate SEO URLs v2.2d function tep_reset_cache_data_seo_urls($action){ switch ($action){ case 'reset': case 'uninstall': tep_db_query("DELETE FROM cache WHERE cache_name LIKE '%seo_urls%'"); tep_db_query("UPDATE configuration SET configuration_value='false' WHERE configuration_key='SEO_URLS_CACHE_RESET'"); if ($action == 'reset') break; tep_db_query("DELETE FROM configuration_group WHERE configuration_group_title LIKE '%seo_urls%'"); tep_db_query("DELETE FROM configuration WHERE configuration_key LIKE 'SEO%' OR configuration_key LIKE 'USE_SEO%'"); break; default: break; } # The return value is used to set the value upon viewing # It's NOT returining a false to indicate failure!! return 'false'; }

You made a mistake with the changes in admin. Double check those to be sure you didn't overwrite a php delimiter (<?php and ?>).

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

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