Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ultimate SEO URLs - by Chemo


Guest

Recommended Posts

Well I don't know much about php but when I changed line 1073 from return current page to return return the same as the other lines below everything seems to be working.Maybe somebody knows if this will mess something else up.

line : 1064 to1073

 

function requested_page()

{

$protocol = ((int) $_SERVER['SERVER_PORT'] === 443)? 'https://' : 'http://';

$current_page = $protocol . $_SERVER['HTTP_HOST'] . ((!empty($_SERVER['REQUEST_URI']))? $_SERVER['REQUEST_URI'] : '');

$current_page = substr($current_page, strlen(HTTP_SERVER));

if (($pos = strpos($current_page, "?osCsid")) !== FALSE)

$current_page = substr($current_page, 0, $pos).'<br>';

if ($current_page[0] == "/")

$current_page = substr($current_page, 1);

 

Changed commented out // return $current_page;

 

Now

return $return;

 

 

Thank you, thank you, thank you.

 

I searched for hours but thought my problem was due to Products Listing Columns!

 

I'm so glad I found this post I had to thank you.

Link to comment
Share on other sites

  • Replies 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

Well I don't know much about php but when I changed line 1073 from return current page to return return the same as the other lines below everything seems to be working.Maybe somebody knows if this will mess something else up.

line : 1064 to1073

 

function requested_page()

{

$protocol = ((int) $_SERVER['SERVER_PORT'] === 443)? 'https://' : 'http://';

$current_page = $protocol . $_SERVER['HTTP_HOST'] . ((!empty($_SERVER['REQUEST_URI']))? $_SERVER['REQUEST_URI'] : '');

$current_page = substr($current_page, strlen(HTTP_SERVER));

if (($pos = strpos($current_page, "?osCsid")) !== FALSE)

$current_page = substr($current_page, 0, $pos).'<br>';

if ($current_page[0] == "/")

$current_page = substr($current_page, 1);

 

Changed commented out // return $current_page;

 

Now

return $return;

 

Nice work!!

Link to comment
Share on other sites

Upon installing Ultimate SEO URLS I got a 500 error, so I removed "Options +FollowSymLinks" from the .htaccess to get it working again. Then I checked out my catalog to find all categories and products returning 404's.

 

I checked the server and registered globals is ON. I read somewhere that the solution may be to add "RewriteOptions Inherit" underneath "RewriteEngine On" like this

 

RewriteEngine On

RewriteOptions Inherit

 

in the .htaccess. Well, I did that and got a 500 error, so I removed it and I'm still getting a 500 error. Nothing else was changed in the file. What could be wrong?

 

I've installed Ultimate SEO URLS on an estarr server and it works great, but now I'm having problems installing on a 1and1 server. Could it be 1and1?

 

 

I took care of the 500 error but all categories and products are returning 404's. The rewrite is working, but the pages are not. Register Globals is ON. Can anyone help me?

Edited by sheenaw

I'm working on multiple stores with multiple problems.

Link to comment
Share on other sites

I'm getting the mysql error:

1153 - Got a packet bigger than 'max_allowed_packet' bytes

insert into cache (cache_id, cache_language_id, ...... etc

 

It's occuring at the line include('includes/seo_cache.php') in application_top.php. Looks like it will be one of the calls to $cache->save_cache in includes/seo_cache.php which leads to line 101 in includes/classes/cache.class.php which is tep_db_perform('cache', $sql_data_array, 'insert');

 

I'm not sure which version of Chemo SEO urls I've got but it was working until today. The length (strlen) of the cache_data is 1059356.

Link to comment
Share on other sites

Hi All,

 

I just install it and found some problems in product listing, I'm not sure is it only me have this problem or not, can someone also try to check it?

 

problem:

 

when I click to show the catalog's product list in multi-pages, but I only can see the first page, can not see other pages.

for example:

 

"http://mysite/catalog/care-products-sponge-c-27_29.html" to show my products(total result pages: 3),

 

and I try click to see the second page with

"http://mysite/catalog/care-products-sponge-c-27_29.html?page=2&sort=3a" ,

 

but it didn't show me the second page, it is the same with the fist page.

 

Can someone helps to check for me? Thanks!

Link to comment
Share on other sites

I was having the "500 internal error... contact the website administrator" with Register Globals ON.

 

A previous post said that Global Variables was the only reason and you were stuffed otherwise. Well I seem to have gotten it going.

 

I have a dedicated server running Apache 2 on Debian Etch.

 

I tried many solutions - adding different Rewrite Inherit etc. rules to the .htaccess file, reinstalling mod-rewrite on the Apache 2 server etc. but to no avail.

 

The Apache 2 config files for the website are in /etc/apache2/sites-available/name_of_site (the default one is, err... default)

 

I removed the info you were supposed to add to the .htaccess file and manually added the rewrite rules in to the apache config file like this:

 

<Directory "/var/www/shop/">

Options +FollowSymLinks

RewriteEngine On

RewriteBase /catalogue/

 

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 ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_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 ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

</Directory>

 

I put is directly under the <VirtualHost *:80> tag at the top.

 

You then have to restart apache2 which is user: /etc/init.d/apache2 restart

 

It worked straight away.

 

I realise those on shared servers or those without root access may not be able to add these settings directly, but thought that it may help some, even if you ask your hosting provider to make the changes, as using these <VirtualHost> tags in apache is how many providers run multiple sites on one server.

 

It may also aid people who know far more about apache in advising in documentation etc. on other possible troubleshooting methods.

Link to comment
Share on other sites

Hi All,

 

I just install it and found some problems in product listing, I'm not sure is it only me have this problem or not, can someone also try to check it?

 

problem:

 

when I click to show the catalog's product list in multi-pages, but I only can see the first page, can not see other pages.

for example:

 

"http://mysite/catalog/care-products-sponge-c-27_29.html" to show my products(total result pages: 3),

 

and I try click to see the second page with

"http://mysite/catalog/care-products-sponge-c-27_29.html?page=2&sort=3a" ,

 

but it didn't show me the second page, it is the same with the fist page.

 

Can someone helps to check for me? Thanks!

 

 

I'm having the same problem, now I know it is an Ultimate SEO problem with one of my stores. Hoping someone can help us.

 

http://www.oscommerce.com/forums/index.php?act...amp;pid=1163802

I'm working on multiple stores with multiple problems.

Link to comment
Share on other sites

Hi

 

I installed 2.0b because I'm on a Windows host and all seems ok apart from the manufacturers links. When I pick on any manufacturer I get taken back to the main index page. I have searched this thread and saw a few other posts but none seem to be answered.

 

Hope someone can help

 

Cheers

 

Ian

Link to comment
Share on other sites

I'm getting the mysql error:

1153 - Got a packet bigger than 'max_allowed_packet' bytes

insert into cache (cache_id, cache_language_id, ...... etc

 

It's occuring at the line include('includes/seo_cache.php') in application_top.php. Looks like it will be one of the calls to $cache->save_cache in includes/seo_cache.php which leads to line 101 in includes/classes/cache.class.php which is tep_db_perform('cache', $sql_data_array, 'insert');

 

I'm not sure which version of Chemo SEO urls I've got but it was working until today. The length (strlen) of the cache_data is 1059356.

 

 

I am having the same issue as well. Glad to know I'm not alone.

 

Has anyone else seen this and can offer any recommendations?

 

Any assistance would be appreciated.

 

Thanks

Link to comment
Share on other sites

I am having the same issue as well. Glad to know I'm not alone.

 

Has anyone else seen this and can offer any recommendations?

 

Any assistance would be appreciated.

 

Thanks

 

 

Hey guys, I found the fix.

 

Look back on page 74 of this support thread. There is a post by kloomis. He was experiencing the problem and found a fix by changing one line of code in the seo.class.php.

 

I tried it and it worked. The problem appears to be solved.

 

Kloomis is the king !

Link to comment
Share on other sites

Apache linux , redirect doesn't work anymore , 404 on any redirect request. I need a link 2 product in my product_info.php , can i trick this or can someone fix the bug?

Link to comment
Share on other sites

Hello, i have two questions for Ultimate SEO.

 

1) With ultimate Seo is possible to modify the title of each page ?

E.g.: <title>myshop - product name 1</title> , <title>myshop - product name 2</title> , <title>myshop - product name 3</title> , etc....

 

2) How to refresh url's in ultimate seo?

 

I have the url of product formatted with font color with this type of link:

catalog/font-color0000ffname-of-product-p-295.html

 

Now, i have deleted <font color=0000ff> after the name of product in admin panel, but the link is:

catalog/font-color0000ffname-of-product-p-295.html

 

How to modify Ultimate Seo to view the new link format (catalog/name-of-product-p-295.html) ?

 

Your help is appreciated

Thanks

Edited by alexwebbing
Link to comment
Share on other sites

I have installed this contribution. Its great I just have problem with paging.

If the products are more on the page, the page shows page numbers.

Now when I click on page numbers, the same page appears again, it doesn't go to next page.

I think I need to do something in htaccess file but I don't know how to write redirect rule.

You can check the website I developed at http://www.theramedic.co.uk/rise-recline-chairs-c-29.html

click on the page 2 at the bottom of the product list, it wont go anywhere.

I really need help urgently, thanks in advance.

 

regards,

Mahendra Sharma

Thanks

Mahendra Sharma

Sharma Infoway

Link to comment
Share on other sites

hi i am having problems when you click a product on the main page on the left it will return with new products but everything else is working i cannot work it out please help

Link to comment
Share on other sites

Hi

 

I have moved servers and fo some reason I get the following now

 

Previously url = www.mysite.com/digitalphotoframes.........

 

now url = www.mysite.com/digital-photo-frame.....

 

I have not changed anything but need to revert to the latter as have many links pointing incorrectly now.

 

Any help would be appreciated

Link to comment
Share on other sites

quick question

 

i enable it and and lets say for one of the catorgies it has link http://socomtactical.net/armysurplus-c-39.html but when you click on it it doesnt find the page have i missed a setting?

 

 

Check your .htaccess file and the for RewriteBase /directory/ (change /directory/ to whatever it is) I just took out the whole line and threw the file into the root of the catalog directory and it works fine.

 

I've been reading through this forum - this contribution works fine with Register Globals OFF. (I know this isn't something you have raised, but while I was here typing this I thought I would mention it).

 

Good luck!

Link to comment
Share on other sites

Hi I've been running ultimate SEO on my site for over 2 years and it's been working fine until my hosting company upgraded mysql and php. It's now giving errors but the links on the category page are not correctly formed, for example:

 

http://www.hammocks4u.co.uk/-c-95.html

instead of

http://www.hammocks4u.co.uk/advertising-pr...ional-c-95.html?

 

I've updated the seo class file as advised on the contribution page....but no joy?

Link to comment
Share on other sites

Can somebody confirm this, I have installed SEO URLs and when I have listing of products, I add product to shopping cart and continue with continue shopping button. The problem is that now link has changes to category-X.html?sort=2a&product_id=XX and and every click on buy now button ads the same product to shopping cart, because product_id variable is same for all products in listing. I fixed this with editing shopping_cart.php

 

				<td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action','products_id')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td>

 

as you see here, array('action','products_id'), I added products_id and this will exclude it from link. From now on, everything works..

Edited by ErollorD
Link to comment
Share on other sites

Hey Guys,

 

I have had a prob lem with this contribution for about 2 and a half months no as you can see from my previous posts.

This morning i created a new vanilla install oscommerce shop and the first contrib i used is this one and i still cant get it working !!!!

 

I dont have any errors or problems installing, my problem is that the urls are not rewriting i think !!

 

As soon as i click any of my links i get " Object not found " 404 error !!!

 

My site is still in development so its on my localhost

 

fashionmaniac.local

 

this is in my .htaccess

 

Options +FollowSymLinks
RewriteEngine On
RewriteBase /catalog/

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 ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_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 ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

 

 

my .htaccess file is located in the folder before the catalog folder

 

Please if you can help me in anyway please please do !!!!

Link to comment
Share on other sites

Hey guys, I found the fix.

 

Look back on page 74 of this support thread. There is a post by kloomis. He was experiencing the problem and found a fix by changing one line of code in the seo.class.php.

 

I tried it and it worked. The problem appears to be solved.

 

Kloomis is the king !

 

I couldn't find the function requested_page() nor the file includes/classes/seo.class.php maybe I have a different version. Anyway my error 1153 - Got a packet bigger than 'max_allowed_packet' bytes has reoccured. My host previous made an adjustment which fixed the problem, so I assume he simply increased the value for 'max_allowed_packet', but as more products have been added I guess the new value has now been exceeeded.

 

If I save the content bound for the cache_data field in a text file it amounts to just over 1MB which does not seem a lot compared to the common setting of max_allowed_packet=16MB that I see mentioned on the net.

Link to comment
Share on other sites

Just Installed Ultimate SEO 2.2. Seems like index.php working great, but every other page after 404. Now I get this without .htaccess.

When I update .htaccess under catalog I get Internal server error for the whole website and admin.

 

I had this (everything is commented out) in .htaccess before:

 

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

 

# 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

 

Should I comment out anything of this and add the rewrite update from the install? Or what am I doing wrong,

please help

Link to comment
Share on other sites

Ultimate_SEO_URLs_v2-2.2e on osCommerce MS-2.2

-------------------------------------------------------------------------------

 

I had the same question previously, but no one answered.

 

I just added the update at the bottom and left the rest of that file alone and works fine for me. Even tried it by replacing all the existing documentation with the update and it worked the same. Not saying anyone should try anything I have done, I am very new at this!

 

And I did backup! I learned the hard way, LOL! Three or four re-installs later.

 

-------------------------------------------

Yours has a difference, don't know if it matters!

------------------

#<IfModule mod_setenvif.c>

# <IfDefine SSL>

# SetEnvIf User-Agent ".*MSIE.*" \

# nokeepalive ssl-unclean-shutdown \

# downgrade-1.0 force-response-1.0

# </IfDefine>

#</IfModule>

------------------------------

My file, plus I added the update. My complete file is below:

-------------------------------

<IfModule mod_setenvif.c>

<IfDefine SSL>

SetEnvIf User-Agent ".*MSIE.*" \

nokeepalive ssl-unclean-shutdown \

downgrade-1.0 force-response-1.0

</IfDefine>

</IfModule>

 

--------------

 

I have everything working perfectly on the Ultimate SEO URLs Contribution. For me the instructions easy to follow.

 

I had to Pay attention to:

STEP #6 "If your store is located in a DIRECTORY add this to the /*directory*/.htaccess file:" ( Example, my directory is " RewriteBase /land_cruiser_parts/catalog/ " )

 

My Working File:

------------------------

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

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /land_cruiser_parts/catalog/

 

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 ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_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 ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}

-------------------------------------------------------------------------------

 

Added my SSL cert plus updated the files needed:

catalog/includes/configure.php

admin/includes/configure.php

 

-----------------------------------------------------

 

I added the Bug Fix in Ultimate SEO 2-2.2e:

In /catalog/includes/classes/seo.class.php

Under function ValidateName

 

Find:

if ((strpos($parts[count($parts) - 2], $type)) !== FALSE)

 

Replace with:

if ($parts[count($parts) - 2] == $type)

 

----------------------------------------------------

 

And that's all I did, everything works great!

 

Please remember I am new at this. I have installed six stores with this contribution with four other contributions on each, all successful, plus re-installed 4 BOO BOOS....!!!!

 

Made it a habit to copy the original documentation and try the updates, if it's a failure replaced the original.

 

Hope everything is clear and didn't forget anything.

 

--------------------------------

 

Question:

Should I have caching features set at true in configuration along with the SEO url contribution?

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