Jump to content
Sign in to follow this  
FWR Media

[Contribution] Independent SEO URL Validation

Recommended Posts

This contribution is to be used with 2.1d original updated NOT other versions.

 

I won't be supporting issues related to the others.

 

 

So does that mean you can't help with the version I am using by you

Share this post


Link to post
Share on other sites
So does that mean you can't help with the version I am using by you

 

 

Sigh .. If it is a version I uploaded (or the original) then I support it.

 

http://mosgifts.com/-c-22.html

 

 

Redirects perfectly to ...

 

http://mosgifts.com/western-decor-c-22.html

 

 

http://mosgifts.com/western-decor-c-999.html

 

Does not die with a 404 message as it should so that code has been replaced/removed

Share this post


Link to post
Share on other sites
HI FRW

 

I'v installed Ultimate_SEO_21d_UPDATED that sill work, until that point to register new user, it seems others in this board get same!

 

concretely is, seo.call.php don't insert the customer_id into table customers, customers_info and address_book

 

I try it with all cache enable or disable

 

 

SEO URLs does not affect the login, register or any other https based page. The only way it could do so is if the installation was messed up.

Share this post


Link to post
Share on other sites
Sigh .. If it is a version I uploaded (or the original) then I support it.

 

http://mosgifts.com/-c-22.html

 

 

Redirects perfectly to ...

 

http://mosgifts.com/western-decor-c-22.html

 

 

http://mosgifts.com/western-decor-c-999.html

 

Does not die with a 404 message as it should so that code has been replaced/removed

 

should I still see the osCsid number after the install

Share this post


Link to post
Share on other sites
so does that mean the above url is not working and if so what to do to fix

 

That works as standard with an untouched install, what to do with your specific code I don't know.

 

re: osCsid that is nothing to do with this contribution, if your settings are correct it will disappear after a few clicks.

Share this post


Link to post
Share on other sites
That works as standard with an untouched install, what to do with your specific code I don't know.

 

re: osCsid that is nothing to do with this contribution, if your settings are correct it will disappear after a few clicks.

 

 

thanks for the reply guess the only thing to do is check the code go back through and see what I missed

 

if the 404 redirect is not working

Share this post


Link to post
Share on other sites

I am still having the same problem with this contribution.

 

Basically if I go and enable "Seo URL validation" on ADMIN then I get this response from firefox on categories and products: "Redirect Loop- Firefox has detected that the server is redirecting the request for this address in a way that will never complete"

 

Please help me figure out what's going on

 

Thanks in advance!

 

Ricardo

Share this post


Link to post
Share on other sites
I am still having the same problem with this contribution.

 

Basically if I go and enable "Seo URL validation" on ADMIN then I get this response from firefox on categories and products: "Redirect Loop- Firefox has detected that the server is redirecting the request for this address in a way that will never complete"

 

Please help me figure out what's going on

 

Thanks in advance!

 

Ricardo

 

Ricardo please stop repeating .. this contribution does not have that problem.

 

If you have ULTIMATE SEO URLs 2.1d ORIGINAL updated installed (and no other version) and it is installed correctly then your problem does not exist.

 

If you try this and it persists then I need a link.

Edited by FWR Media

Share this post


Link to post
Share on other sites
Ricardo please stop repeating .. this contribution does not have that problem.

 

If you have ULTIMATE SEO URLs 2.1d ORIGINAL updated installed (and no other version) and it is installed correctly then your problem does not exist.

 

If you try this and it persists then I need a link.

 

 

Hello Robert, sorry for reposting...

 

I enable the SEO Validation for you to see it. Keep in mind that while it is enable, customers have no access to any of my categories or products, but I guess its a sacrifice I have to make in order to make this work

 

...here is the link to a product indexed by Google:

 

http://www.yogicchai.com/catalog/yogicchai...;products_id=38

 

It goes on a loop and loop without redirecting to the right page.

 

You helped me with ULTIMATE SEO URLs 2.1d ORIGINAL updated and is working perfect now, so I don't think the error is coming from there, but I don't know about this stuff.

 

Again here is the link:

 

http://www.yogicchai.com/catalog/yogicchai...;products_id=38

 

Thanks for your help again!

 

Ricardo

Share this post


Link to post
Share on other sites
Hello Robert, sorry for reposting...

 

I enable the SEO Validation for you to see it. Keep in mind that while it is enable, customers have no access to any of my categories or products, but I guess its a sacrifice I have to make in order to make this work

 

...here is the link to a product indexed by Google:

 

http://www.yogicchai.com/catalog/yogicchai...;products_id=38

 

It goes on a loop and loop without redirecting to the right page.

 

You helped me with ULTIMATE SEO URLs 2.1d ORIGINAL updated and is working perfect now, so I don't think the error is coming from there, but I don't know about this stuff.

 

Again here is the link:

 

http://www.yogicchai.com/catalog/yogicchai...;products_id=38

 

Thanks for your help again!

 

Ricardo

 

Try the following test . . (This will die and just report two urls remove the code after use)

 

catalog/includes/functions/general.php

function tep_validate_seo_urls()

 

Find

 

} else if ( $fwr_server_port . $core != $linkreturnedstripped ) { // Link looks bad so 301

 

Add immediately below

 

// BOF: REMOVE ME
die(
'Incoming URL: ' . $fwr_server_port . $core . '<br />
SEO URL Returned: ' . $linkreturnedstripped . '<br />'
);
// EOF: REMOVE ME

 

Got to one of the urls having the problem and this will print out two urls for comparison .. please post them here.

Share this post


Link to post
Share on other sites
Try the following test . . (This will die and just report two urls remove the code after use)

 

catalog/includes/functions/general.php

function tep_validate_seo_urls()

 

Find

 

} else if ( $fwr_server_port . $core != $linkreturnedstripped ) { // Link looks bad so 301

 

Add immediately below

 

// BOF: REMOVE ME
die(
'Incoming URL: ' . $fwr_server_port . $core . '<br />
SEO URL Returned: ' . $linkreturnedstripped . '<br />'
);
// EOF: REMOVE ME

 

Got to one of the urls having the problem and this will print out two urls for comparison .. please post them here.

 

Hi Robert,

 

here is the response I get:

 

Incoming URL: http://www.yogicchai.com//catalog/yogiccha...lavor-c-24.html

SEO URL Returned: http://www.yogicchai.com/catalog/yogicchai...lavor-c-24.html

Share this post


Link to post
Share on other sites

 

Incoming url is the problem http://www.yogicchai.com//catalog/

 

Validation is correct in redirecting it.

Edited by FWR Media

Share this post


Link to post
Share on other sites
Incoming url is the problem http://www.yogicchai.com//catalog/

 

Validation is correct in redirecting it.

 

I don't understand...

 

If I use the above link without the Validation being enable, in my browser it reads without the extra "/"

Once I enable it the the extra "/" shows up

 

Any clue?

 

It can't be from my settings at include/configure right?

 

Please help...thanks!

Share this post


Link to post
Share on other sites
I don't understand...

 

If I use the above link without the Validation being enable, in my browser it reads without the extra "/"

Once I enable it the the extra "/" shows up

 

Any clue?

 

It can't be from my settings at include/configure right?

 

Please help...thanks!

 

could you post from includes/configure.php your first 9 defines

Share this post


Link to post
Share on other sites
could you post from includes/configure.php your first 9 defines

 

catalog/yogicchai/include/configure.php:

 

define('HTTP_SERVER', 'http://www.yogicchai.com/'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.yogicchai.com/'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'http://www.yogicchai.com');

define('HTTPS_COOKIE_DOMAIN', 'http://www.yogicchai.com');

define('HTTP_COOKIE_PATH', 'catalog/yogicchai/');

define('HTTPS_COOKIE_PATH', 'catalog/yogicchai/');

define('DIR_WS_HTTP_CATALOG', 'catalog/yogicchai/');

define('DIR_WS_HTTPS_CATALOG', 'catalog/yogicchai/');

 

catalog/yogicchai/admin/include/configure.php:

 

define('HTTP_SERVER', 'http://www.yogicchai.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.yogicchai.com');

define('HTTPS_CATALOG_SERVER', 'https://www.yogicchai.com');

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT','/home/content/y/o/g/yogicchai/html'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_WS_ADMIN', '/catalog/yogicchai/admin/');

define('DIR_FS_ADMIN', '/home/content/y/o/g/yogicchai/html/catalog/yogicchai/admin/');

define('DIR_WS_CATALOG', '/catalog/yogicchai/');

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

Share this post


Link to post
Share on other sites
catalog/yogicchai/include/configure.php:

 

define('HTTP_SERVER', 'http://www.yogicchai.com/'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.yogicchai.com/'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'http://www.yogicchai.com');

define('HTTPS_COOKIE_DOMAIN', 'http://www.yogicchai.com');

define('HTTP_COOKIE_PATH', 'catalog/yogicchai/');

define('HTTPS_COOKIE_PATH', 'catalog/yogicchai/');

define('DIR_WS_HTTP_CATALOG', 'catalog/yogicchai/');

define('DIR_WS_HTTPS_CATALOG', 'catalog/yogicchai/');

 

catalog/yogicchai/admin/include/configure.php:

 

define('HTTP_SERVER', 'http://www.yogicchai.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', 'http://www.yogicchai.com');

define('HTTPS_CATALOG_SERVER', 'https://www.yogicchai.com');

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT','/home/content/y/o/g/yogicchai/html'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

define('DIR_WS_ADMIN', '/catalog/yogicchai/admin/');

define('DIR_FS_ADMIN', '/home/content/y/o/g/yogicchai/html/catalog/yogicchai/admin/');

define('DIR_WS_CATALOG', '/catalog/yogicchai/');

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

 

there's your problem ..

 

define('HTTP_SERVER', 'http://www.yogicchai.com/'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.yogicchai.com/'); // eg, https://localhost - should not be empty for productive servers

 

There should be no / after the domain name

 

I've alterred the others for you (catalog only)..

 

  define('HTTP_SERVER', 'http://www.yogicchai.com'); // eg, [url="http://localhost"]http://localhost[/url] - should not be empty for  productive servers
 define('HTTPS_SERVER', 'https://www.yogicchai.com'); // eg, [url="https://localhost"]https://localhost[/url] - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.yogicchai.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.yogicchai.com');
 define('HTTP_COOKIE_PATH', '/catalog/yogicchai/');
 define('HTTPS_COOKIE_PATH', '/catalog/yogicchai/');
 define('DIR_WS_HTTP_CATALOG', '/catalog/yogicchai/');
 define('DIR_WS_HTTPS_CATALOG', '/catalog/yogicchai/');

Share this post


Link to post
Share on other sites
there's your problem ..

 

define('HTTP_SERVER', 'http://www.yogicchai.com/'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.yogicchai.com/'); // eg, https://localhost - should not be empty for productive servers

 

There should be no / after the domain name

 

I've alterred the others for you (catalog only)..

 

  define('HTTP_SERVER', 'http://www.yogicchai.com'); // eg, [url="http://localhost"]http://localhost[/url] - should not be empty for  productive servers
 define('HTTPS_SERVER', 'https://www.yogicchai.com'); // eg, [url="https://localhost"]https://localhost[/url] - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.yogicchai.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.yogicchai.com');
 define('HTTP_COOKIE_PATH', '/catalog/yogicchai/');
 define('HTTPS_COOKIE_PATH', '/catalog/yogicchai/');
 define('DIR_WS_HTTP_CATALOG', '/catalog/yogicchai/');
 define('DIR_WS_HTTPS_CATALOG', '/catalog/yogicchai/');

 

Wow Robert!!! Thank you so much for taking the time to help me out with this issue.

 

Everything is working out as it should.

 

I really, really, really appreciate your help

 

- Ricardo

Share this post


Link to post
Share on other sites

Hi Robert,

 

Google sitemaps has showed some redirect errors (404) with some links. After a couple of hours of searching, I discovered that your contribution could have a conception problem. Let me explain...

 

As I have a french shop, a lot of "a" are present in the name of products, articles, etc URL's (like "à la carte"). The Ulti. SEO contrib changes this link into "-a-123.html".

 

Now in your function tep_validate_seo_urls(), you are searching for the presence of "-a-" in the URL string. If found, you are redirecting to the article_info page and not to the product_info page for example. Is it not safer to check like the rewriterules do ?

 

(.*)-a-([0-9]+).html

 

instead of

 

strpos($_SERVER['REQUEST_URI'], '-a-')

 

Example of 404 error with this link : http://[hidden]/catalog/sur-mesure-a-la-carte-fc-4.html.

 

This should display a faqdesk category (fc-4) and not looking for an article_info (-a-) with ID 4. I get a 404 for this link.

 

What do you think ? Possible to improve ? Other wise great contrib that does a good job by validating the SEO URLs...

Edited by Spaceboy

Share this post


Link to post
Share on other sites
Hi Robert,

 

Google sitemaps has showed some redirect errors (404) with some links. After a couple of hours of searching, I discovered that your contribution could have a conception problem. Let me explain...

 

As I have a french shop, a lot of "a" are present in the name of products, articles, etc URL's (like "à la carte"). The Ulti. SEO contrib changes this link into "-a-123.html".

 

Now in your function tep_validate_seo_urls(), you are searching for the presence of "-a-" in the URL string. If found, you are redirecting to the article_info page and not to the product_info page for example. Is it not safer to check like the rewriterules do ?

 

(.*)-a-([0-9]+).html

 

instead of

 

strpos($_SERVER['REQUEST_URI'], '-a-')

 

Example of 404 error with this link : http://[hidden]/catalog/sur-mesure-a-la-carte-fc-4.html.

 

This should display a faqdesk category (fc-4) and not looking for an article_info (-a-) with ID 4. I get a 404 for this link.

 

What do you think ? Possible to improve ? Other wise great contrib that does a good job by validating the SEO URLs...

 

Yup you are quite right, I haven't done much work with "languages" so this type of thing was not obvious to me.

 

I'll have a think about it.

Share this post


Link to post
Share on other sites

Hello,

 

I have ultimate seo url v2.5 and when I tried to install this contribution the following error appears:

 

 

1136 - Column count doesn't match value count at row 1

 

INSERT INTO `configuration` VALUES (null, 'Enable Seo URL validation?', 'FWR_VALIDATION_ON', 'false', 'Enable the SEO URL validation?', 10001, '1', NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')

 

[TEP STOP]

 

 

I thank you for any help?

 

Paulo

Share this post


Link to post
Share on other sites
Hello,

 

I have ultimate seo url v2.5 and when I tried to install this contribution the following error appears:

 

 

1136 - Column count doesn't match value count at row 1

 

INSERT INTO `configuration` VALUES (null, 'Enable Seo URL validation?', 'FWR_VALIDATION_ON', 'false', 'Enable the SEO URL validation?', 10001, '1', NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')

 

[TEP STOP]

 

 

I thank you for any help?

 

Paulo

 

A contribution has changed the configuration table which is probably a very bad idea, anyway, try changing the following in the installer ..

 

  tep_db_query("INSERT INTO `".TABLE_CONFIGURATION."` (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) 
 VALUES ('Enable Seo URL validation?', 'FWR_VALIDATION_ON', 'false', 'Enable the SEO URL validation?', ".$group.", '1', NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')");

Edited by FWR Media

Share this post


Link to post
Share on other sites
A contribution has changed the configuration table which is probably a very bad idea, anyway, try changing the following in the installer ..

 

  tep_db_query("INSERT INTO `".TABLE_CONFIGURATION."` (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) 
 VALUES ('Enable Seo URL validation?', 'FWR_VALIDATION_ON', 'false', 'Enable the SEO URL validation?', ".$group.", '1', NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')");

 

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

Thank you so much. Now it´s worked.

Share this post


Link to post
Share on other sites
Yup that looks nice Didier.

 

Hi, Been trying to get this http_error.php to work, but I keep getting a blank page. This is what I've put in my general.php function:

 

function four_o_four_die() { // 404 then redirect doesn't work as Google records

a 302 so we need to die here with a 404

echo

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

include('/http_error.php?error_id=404');

exit;

}

 

I've also tried include(HTTP_SERVER . DIR_WS_... . 'http_error.php?error_id=404'); (and several other varations). What I'm referencing works if I type it in the address bar, but in the program, it is not working and I've tried echo'ing out the URL to make sure it's right and it seems it is right, just not working. :(

 

You could see this at scavengeinc dot com / somethingrandom-c-999.html

 

If you could maybe point me in the right direction, I'd be most grateful

Edited by movingon

Share this post


Link to post
Share on other sites
Hi, Been trying to get this http_error.php to work, but I keep getting a blank page. This is what I've put in my general.php function:

 

function four_o_four_die() { // 404 then redirect doesn't work as Google records

a 302 so we need to die here with a 404

echo

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

include('/http_error.php?error_id=404');

exit;

}

 

I've also tried include(HTTP_SERVER . DIR_WS_... . 'http_error.php?error_id=404'); (and several other varations). What I'm referencing works if I type it in the address bar, but in the program, it is not working and I've tried echo'ing out the URL to make sure it's right and it seems it is right, just not working. :(

 

You could see this at scavengeinc dot com / somethingrandom-c-999.html

 

If you could maybe point me in the right direction, I'd be most grateful

 

This was answerd two pages back.

 

http://forums.oscommerce.com/index.php?s=&...t&p=1303754

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  

×