Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Independent SEO URL Validation


FWR Media

Recommended Posts

Hello I am using this in my oscommerce setup with version 2.6 of SEO URL's and RC 2.1 oscommerce. Currently with your script and seo urls I also added what every website has these days and that is a 301 redirect from non-www version (example.com) to a www version (www.example.com). The problem with this is whether the url is correct or not if you type the domain name as this:

 

example.com/correct-name-p-566.html

 

it throws up a http 400 error. Is there anyway to fix this as I want to keep the redirect from non-www to www. Thanks!

Link to comment
Share on other sites

  • Replies 382
  • Created
  • Last Reply

Top Posters In This Topic

  • FWR Media

    150

Hello I am using this in my oscommerce setup with version 2.6 of SEO URL's and RC 2.1 oscommerce. Currently with your script and seo urls I also added what every website has these days and that is a 301 redirect from non-www version (example.com) to a www version (www.example.com). The problem with this is whether the url is correct or not if you type the domain name as this:

 

example.com/correct-name-p-566.html

 

it throws up a http 400 error. Is there anyway to fix this as I want to keep the redirect from non-www to www. Thanks!

 

Sorry I don't support the broken versions .. only 2.1d ORIGINAL updated .. perhaps change.

Link to comment
Share on other sites

Whats the difference between 2.1d and 2.6? All I would have to do is replace the seo.class.php file correct?

 

That would normally be the case .. I don't follow the miriad of broken versions.

Link to comment
Share on other sites

That would normally be the case .. I don't follow the miriad of broken versions.

 

Alright I will try that and let you know how it worked out. Also could you point me in the direction of a contribution that prevents ?sort=x etc from being indexed by Google.. Thanks again!

Edited by Greens44
Link to comment
Share on other sites

Hello..

 

Dont normally comment to much on the forum but after installing this great contribution, which i believe is essential when using the Ultimate SEO URL i think its only right to thank Robert at FWR media for the great work he has done here..

 

Using this contrib and his version of ultimate seo urls not only works perfectly but has made a big difference in a very short time.

 

I would like to thank you for the work you put into this..

 

Thanks

Ian

Link to comment
Share on other sites

  • 3 weeks later...
http://mysite.com//my-great-product-c-99999.html

 

it just goest to "The webpage cannot be found" and not the 404 header from the contribution.

 

any ideas??

 

That would mean that validation is not installed correctly .. all validation does is take the incoming url .. if it is an seo url it asks the seo url class for a fresh url .. if the two don't match it 301 redirects it .. if it doesn't exist it gives 404.

 

In your example it does nothing which can't happen.

 

 

I have the same problem. Your 404 message works fine in "localhost", but in my website I receive the windows server official 404 message (The webpage cannot be found.. back link..etc).

 

Localhost works fine, in server doesn't work. So, I think that the problem is in the server configuration or maybe I have to add a redirect 404 in the htacces file?, I don't know, what do you think?

 

 

Thank you for your time and your work.

 

 

SunDust

Edited by SunDust
Link to comment
Share on other sites

I have the same problem. Your 404 message works fine in "localhost", but in my website I receive the windows server official 404 message (The webpage cannot be found.. back link..etc).

 

Localhost works fine, in server doesn't work. So, I think that the problem is in the server configuration or maybe I have to add a redirect 404 in the htacces file?, I don't know, what do you think?

 

 

Thank you for your time and your work.

 

 

SunDust

 

Hi your basic settings are wrong so the contribution cannot function ..

 

http://mysite.com//

Link to comment
Share on other sites

I agree. If these imaginary urls don't exist then why address them. It is a non issue. I can't think of any real world examples where this "bug" would adversely affect search engine spidering and optimasation. I would love to see a full explanation on how this problem would manifest itself.

 

No you are wrong it is not a non issue, and if you felt it was so, what are you doing in this thread? :huh:

 

1) People changing the names of products, therefore the index has incorrect links and causes penalty without a genuinie 301 redirect.

 

2) People using a broken version of seo urls that produced bad urls like mysite.com/-c-47.html. This happens all the time.

 

3) A competitor publishing an arbritrary number of incorrect links pointing to your competing product in order to get it penalised.

 

There are more but I'll leave it there.

Link to comment
Share on other sites

Hi your basic settings are wrong so the contribution cannot function ..

 

http://mysite.com//

 

 

Hi Mr. Fisher,

 

May you give more clues?

 

I have no problems in my computer (localhost) but I have two real sites on two different servers and I have the same problem in both. I have to talk with my hosting company to modify some file? I have to look for some file to modify it by myself? which file? what do you mean with http://mysite.com// ?

 

Thank you,

Best Regards

SunDust

Link to comment
Share on other sites

Hi Mr. Fisher,

 

May you give more clues?

 

I have no problems in my computer (localhost) but I have two real sites on two different servers and I have the same problem in both. I have to talk with my hosting company to modify some file? I have to look for some file to modify it by myself? which file? what do you mean with http://mysite.com// ?

 

Thank you,

Best Regards

SunDust

 

includes/configure.php

Link to comment
Share on other sites

  • 2 months later...

Hi Robert

 

Thank you for your contribution!

 

I am using ‘Independent SEO URL Validation v1.0.4’ with ‘Ultimate SEO URLSv21d UPDATED-07-NOV-2008’

 

The version of Oscommerce is 2.2rc2a

 

Upon testing the site I noticed that ‘Continue Shopping’ button in the shopping cart takes me to “404 - This product/category does not exist it may have been deleted.” And then a link back to the index page.

 

When I hover over “continue shopping” button it links to a page called –c-.html which does not exist.

 

When I turn validation off in admin (ultimate seo urls is on), continue shopping button works again.

When I turn ultimate seo urls off in admin (validation is on), continue shopping button works.

I also turned WC3 off and reset cache but this did not work

 

I found some references within this post about the continue shopping button and added the fix as outline by yourself on post 71 for both the /shopping cart and /includes/modules/product_listing.php but did not work.

 

My site is www.gamefront.co.uk. Please kindly take a look when you can.

 

Thank you!

Link to comment
Share on other sites

  • 4 weeks later...
Hi Robert

 

Thank you for your contribution!

 

I am using ‘Independent SEO URL Validation v1.0.4’ with ‘Ultimate SEO URLSv21d UPDATED-07-NOV-2008’

 

The version of Oscommerce is 2.2rc2a

 

Upon testing the site I noticed that ‘Continue Shopping’ button in the shopping cart takes me to “404 - This product/category does not exist it may have been deleted.” And then a link back to the index page.

 

When I hover over “continue shopping” button it links to a page called –c-.html which does not exist.

 

When I turn validation off in admin (ultimate seo urls is on), continue shopping button works again.

When I turn ultimate seo urls off in admin (validation is on), continue shopping button works.

I also turned WC3 off and reset cache but this did not work

 

I found some references within this post about the continue shopping button and added the fix as outline by yourself on post 71 for both the /shopping cart and /includes/modules/product_listing.php but did not work.

 

My site is www.gamefront.co.uk. Please kindly take a look when you can.

 

Thank you!

 

HI

 

I have managed to fix the above problem.

 

Thanks!

Edited by Mayaka
Link to comment
Share on other sites

  • 2 months later...

Hi Robert

 

I have the very first version V1.0 February 7th 2008 installed. All appears well, but just doing a site check of all SEO contributions.

 

I can't work out the manual upgrade but I don't have attributes/ssl so that is probably why I haven't needed these updates.

 

Should I just overwrite general.php where changes have been said and application_top.php where there are differences too?

 

Or should I leave alone?

 

Thanks

Link to comment
Share on other sites

  • 2 months later...

hello,

great contribution thanks!

 

little add-on, for people with IE8 there is an standard error page used in this browser.

Firefox uses the one in the script.

 

change: catalog/includes/functions/general.php

 

echo

header("HTTP/1.0 404 Not Found") .

'<p align="left" style="font-size: large;">  404 Page not found!</p>

 

to:

 

echo

header("HTTP/1.0 404 Not Found") .

'

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

<p align="left" style="font-size: large;">  404 Page not found!</p>

 

 

this will work in IE8 and will display the page created in the code, and no default IE8.

 

greetz, Marco

Link to comment
Share on other sites

  • 4 weeks later...

hi

 

 

Thanks for the contrib.

i installed this contrib.In SEO URL do i need to leave Enable automatic redirects? to true or false.some of my product name do change requently.

 

Kind regards

 

Nafri

 

Hi this contribution is now not necessary as long as you are using the latest Ultimate Seo Urls 5 ( have to be on PHP5.2+ )

 

http://www.oscommerce.com/forums/topic/336702-ultimate-seo-urls-5-by-fwr-media

Link to comment
Share on other sites

  • 3 weeks later...

Hi FWR Media,

 

I've installed the newsest version of this contribution and it works beautifully redirecting active products to the new seo urls and categories as well.

 

However the 404 for inactive products is not working.

 

For example if I type in a product that does not exist like so

test-product-p-55555.html

 

and the product is inactive or does not exist I get redirected to:

product_info.php?products_id=5555

 

Shouldn't this send me to a 404 page as the product does not exist? How can I fix this in your code? I'm using one of the last Chemo versions of SEO URLs, i think version 2.1c if that helps...

Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

Hi FWR Media,

 

I've installed the newsest version of this contribution and it works beautifully redirecting active products to the new seo urls and categories as well.

 

However the 404 for inactive products is not working.

 

For example if I type in a product that does not exist like so

test-product-p-55555.html

 

and the product is inactive or does not exist I get redirected to:

product_info.php?products_id=5555

 

Shouldn't this send me to a 404 page as the product does not exist? How can I fix this in your code? I'm using one of the last Chemo versions of SEO URLs, i think version 2.1c if that helps...

 

If you are running PHP5.2+ I would suggest upgrading to Ultimate Seo Urls 5 which has inbuilt validation, see my signature.

 

With the launch of USU5 I consider this contribution to be superceded.

 

Answering your question though .. it should show a 404 page yes.

Link to comment
Share on other sites

Thanks for the quick reply! I think I may have found the culprit, in your lastest version of this contribution in general.php I found the line:

if (strpos($linktest, '-') === 0) { // If the link returned by seo.class.php has no text mysite.com/-c-xxx.html

 

If I change the === 0 to == 0 it redirects properly!

Is this the correct fix as equals is normally == or is it supposed to be === on purpose for some other reason?

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

One more question, currently out of stock products are being redirected to the 404 by your contribution (if I remove this contribution they show).

If I want my products that are marked out of stock to still show, because they will be resotcked at a later date and NOT be redirected (only invalid products to be redirected) how do I modify that in your code FMR Media?

Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

One more question, currently out of stock products are being redirected to the 404 by your contribution (if I remove this contribution they show).

If I want my products that are marked out of stock to still show, because they will be resotcked at a later date and NOT be redirected (only invalid products to be redirected) how do I modify that in your code FMR Media?

 

This contribution does nothing to affect products that are out of stock . . perhaps seo urls does not return an seo url for products that are out of stock, therefore creating the 404?

Link to comment
Share on other sites

This contribution does nothing to affect products that are out of stock . . perhaps seo urls does not return an seo url for products that are out of stock, therefore creating the 404?

 

 

It has something to do with the contribution....

 

When disable this contribution and go to the out-of-stock products page, the page is displayed correctly, with an seo url, I get the following url:

this-is-the-product-p-1052.html

 

when I renable this contribution and go to the out-of-stock page I get redirected to

404 page

 

So it's something about how the contribution looks at the product, it must be checking the product_status == 1 or == 0 variable some how either directly or indirectly via a function or class you are using because if I have this contribution enabled and change the status to in-stock it shows properly, out-of-stock it redirects (and when this contribution is disabled the product page shows correctly). Alternatively it could have something to do with how this contribution determines if it is a valid link...

 

Any ideas?

Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

One more thing, I think I have SEO URLS 2.0b because I don't have seo.class.php, it is all in my html_output.php instead. Could this be causing the issue since I don't have seo.class.php referenced in your code snipet below? If so how can I work around to have your contrib look at html_output.php instead of seo.class.php?

 

if (strpos($linktest, '-') == 0) { // If the link returned by seo.class.php has no text mysite.com/-c-xxx.html

four_o_four_die(); // Product/category does not exist so die here with a 404

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

It has something to do with the contribution....

 

When disable this contribution and go to the out-of-stock products page, the page is displayed correctly, with an seo url, I get the following url:

this-is-the-product-p-1052.html

 

when I renable this contribution and go to the out-of-stock page I get redirected to

404 page

 

So it's something about how the contribution looks at the product, it must be checking the product_status == 1 or == 0 variable some how either directly or indirectly via a function or class you are using because if I have this contribution enabled and change the status to in-stock it shows properly, out-of-stock it redirects (and when this contribution is disabled the product page shows correctly). Alternatively it could have something to do with how this contribution determines if it is a valid link...

 

Any ideas?

 

No you are misunderstanding me.

 

It is not the contribution in as much as it does not check whether products are in stock.

 

This is a simple contribution it does the following: -

 

incoming uri = this-is-the-product-p-1052.html

 

This contribution queries seo urls for a fresh uri.

 

If the two do not match it is 301 redirected .. if it comes back with nothing then it is a 404.

 

So .. what I meant by it is not this contribution is that independent seo url validation seems to be doing its job properly but seo urls does not seem to be returning an seo url for the out of stock product for some reason.

 

Does that make more sense?

 

And I therefore wonder .. if you reset the seo urls cache .. would it produce a url for this product at all? I doubt it.

Edited by FWR Media
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...