Jump to content
Sign in to follow this  
FWR Media

ULTIMATE SEO URLs avoid google penalties

Recommended Posts

New version: Thanks to Pooya for the "heads up"

 

Changelog:

 

Alteration made to function tep_validate_seo_urls() whereby an explode was working incorrectly where product names had a hyphen in them. Delimiter now more unique --ex--

 

Upgrade:

 

Just replace the function in includes/functions/general.php

Edited by Babygurgles

Share this post


Link to post
Share on other sites

Ok i got the same error :( when i goto category..

 

Here is an image of my SEO config

 

Do notice the replacement values.

 

 

1_10_02_08_7_54_58.jpg

Edited by Pooya

Share this post


Link to post
Share on other sites
Ok i got the same error :( when i goto category..

 

Here is an image of my SEO config

 

Do notice the replacement values.

1_10_02_08_7_54_58.jpg

 

 

And if SEO URLs is on but independent validation is off?

Share this post


Link to post
Share on other sites

And .. I jumped on this too fast. There was nothing wrong with the original code.

Share this post


Link to post
Share on other sites
By independent validation u mean post # 50 ?

Ive been doing it step by step. no luck so far....

 

 

Pooya a simple question before we take this any further at all .. without my mod (which is what this thread is about)

 

DOES ULTIMATE SEO URLS function or does it have the same error you are talking about???

Share this post


Link to post
Share on other sites

After i did post # 5 this error started popping up.

 

Else it was working fine, obviously the category breaking pages werent opening either.. I mean the Second page of my category.

 

Else the first page of the category would open fine and everything else worked fine.

Share this post


Link to post
Share on other sites
After i did post # 5 this error started popping up.

 

Else it was working fine, obviously the category breaking pages werent opening either.. I mean the Second page of my category.

 

Else the first page of the category would open fine and everything else worked fine.

 

I just can't replicate this problem Pooya without being able to test.

 

http://www.vmart.pk/main/cdr-cdrw-c-2.html is a bog standard SEO URL. I even ran /cdr-cdrw-c-2.html on my sites and it redirected correctly to my own cPath=2

Share this post


Link to post
Share on other sites

When I added this code in everything stopped. I had SEO 2.2e with category_names added and it seemed to be working. But I wanted to get rid of the ability to have rubbish urls which this looked ideal for. (I did not even know that was happening before this thread.) The ability to remove the Id stuff from the end and redirect for 301 and 404 issues also looks great. But...

 

Working from the top of the thread down I commented out the validation lines in seo.classes.php, added the code into application_top and then split that to put the big block of code in includes\functions\general. I have gone over the code a couple of times now and think I have it all right. (Obviously not or I would not be having an issue!)

 

When I click on anything from the home page it just goes off and never finds it. I get a "cannot find server" error in IE and a "being redirected in a way that will never complete" error in FF.

 

It has also wiped out my admin side of the SEO. (This has happened a few times before. You change anything that Chemo's code does not like and it deletes the data from the config tables, but does not replace it. Just an annoyance but it does serve to indicate something did not get passed right).

 

I am sure this must be a simple thing I have pasted in the wrong spot or a bracket or something I missed.

 

If you can point me in the right direction i will try some more.

 

Thanks

Share this post


Link to post
Share on other sites

Working from the top of the thread down I commented out the validation lines in seo.classes.php, added the code into application_top and then split that to put the big block of code in includes\functions\general. I have gone over the code a couple of times now and think I have it all right. (Obviously not or I would not be having an issue!).

 

All you need is the attachment in post #55

 

If you follow the instructions it will work.

Share this post


Link to post
Share on other sites
Hi, i just installed the updated version and set validation true.

 

dunno if this helps you but google has indexed http://www.domain.co.uk/catalog/consoles-c...0_26_31_23.html which is wrong, when clicked it does not redirect. I think underscore errors are kept.

 

I would need a link to your site but if it was wrong the script would redirect it. That 's a long cPath but if that's the way you have built your categories then it would be a correct SEO link.

Share this post


Link to post
Share on other sites
How would u recond the testing phase ?

 

Well firstly can you make sure you have the code from post #55 (download attachment) in place.

 

If you are still getting constant issues I will create some testing code to see why constants are not being recognised.

Share this post


Link to post
Share on other sites

Pooya

 

Here is a test I would like to see the results when you click on that very same link http://www.vmart.pk/main/cdr-cdrw-c-2.html

 

### PLEASE NOTE ###

While this test is in your file your site will not work it uses a DIE();

 

So don't forget to delete the REMOVE ME lines.

 

includes/functions/general.php - function tep_validate_seo_urls()

 

Find ..

 

$validate_array = explode('--ex--', $querytype);

 

Add directly BELOW ..

 

// REMOVE ME
die('$validate_array[0] = ' . strtoupper($validate_array[0]) . '<br />$validate_array[1] = ' . $validate_array[1] . '<br />
$querytype = ' . $querytype . '<br />$_SERVER[\'REQUEST_URI\'] = ' . $_SERVER['REQUEST_URI'] . '<br />');
// REMOVE ME

Share this post


Link to post
Share on other sites
I would need a link to your site but if it was wrong the script would redirect it. That 's a long cPath but if that's the way you have built your categories then it would be a correct SEO link.

 

This happend when i 1st installed SEO (i think google was indexing site at the time). I have since then been using 2.1d and dropped cache table many times.

i'll send link

Share this post


Link to post
Share on other sites

OKay i found this

 

$validate_array = explode('-ex-', $querytype);

 

Note explode('-ex-' as compared to ('--ex--'

 

*Anyway i added the remove me code and the following are the results

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

**While clicking a product

$validate_array[0] = FILENAME_PRODUCT_INFO

$validate_array[1] = products_id=617

$querytype = filename_product_info-ex-products_id=617

$_SERVER['REQUEST_URI'] = /main/a4tech-advanced-office-wireless-kbs26b5-p-617.html

 

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

**WHile clicking a category.

$validate_array[0] = FILENAME_DEFAULT

$validate_array[1] = cPath=3

$querytype = filename_default-ex-cPath=3

$_SERVER['REQUEST_URI'] = /main/dvdr-dvdrw-c-3.html

Share this post


Link to post
Share on other sites
This happend when i 1st installed SEO (i think google was indexing site at the time). I have since then been using 2.1d and dropped cache table many times.

i'll send link

 

Yes well ULTIMATE SEO URLs will accept that even though it is now wrong. When I do the same to my site with my validation installed it 404 redirects as it should. On your site it accepts it so you don't seem to have this mod installed.

Share this post


Link to post
Share on other sites
OKay i found this

 

$validate_array = explode('-ex-', $querytype);

 

Note explode('-ex-' as compared to ('--ex--'

 

*Anyway i added the remove me code and the following are the results

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

**While clicking a product

$validate_array[0] = FILENAME_PRODUCT_INFO

$validate_array[1] = products_id=617

$querytype = filename_product_info-ex-products_id=617

$_SERVER['REQUEST_URI'] = /main/a4tech-advanced-office-wireless-kbs26b5-p-617.html

 

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

**WHile clicking a category.

$validate_array[0] = FILENAME_DEFAULT

$validate_array[1] = cPath=3

$querytype = filename_default-ex-cPath=3

$_SERVER['REQUEST_URI'] = /main/dvdr-dvdrw-c-3.html

 

And both of those produce this "constant" error?

Share this post


Link to post
Share on other sites
Yes well ULTIMATE SEO URLs will accept that even though it is now wrong. When I do the same to my site with my validation installed it 404 redirects as it should. On your site it accepts it so you don't seem to have this mod installed.

 

I have the mod installed and it does redirect on some wrong url but not all. I'v set FWR URL Validation to true.

i'll just keep an eye on thread

Share this post


Link to post
Share on other sites
I have the mod installed and it does redirect on some wrong url but not all. I'v set FWR URL Validation to true.

i'll just keep an eye on thread

 

The only time this could happen is if ULTIMATE SEO URLS reports back the wrong link again.

 

All my validation does in effect is take the incoming URL .. converts it to standard osC and makes a new request to ULTIMATE SEO URLS.

 

If ULTIMATE SEO URLS reports back a URL that matches exactly then my validation has to assume it is correct.

 

I will not be going the route of changing code in ULTIMATE SEO URLS.

Edited by Babygurgles

Share this post


Link to post
Share on other sites
If someone tries to access this --> http://www.mysite.com/index.php?cPath=10

redirect them to --> http://www.mysite.com/category-c-10.html

 

Any solutions?

 

I have it in mind to add that .. watch this space.

Share this post


Link to post
Share on other sites
If someone tries to access this --> http://www.mysite.com/index.php?cPath=10

redirect them to --> http://www.mysite.com/category-c-10.html

 

Any solutions?

 

Wait a minute!!! this is a bog standard feature of ULTIMATE SEO URLs.

 

Go into admin>configuration>SEO URLs

 

Enable automatic redirects? > TRUE

Share this post


Link to post
Share on other sites
And both of those produce this "constant" error?

 

 

By constant yes this was the error i got when i opened a product from the index page and when i clicked a category. be it any category

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×