Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ultimate Seo Urls 5 Pro


FWR Media
 Share

Recommended Posts

Hellooooo.... I'm the perfect example of why someone should not attempt to do something even when everyone claims it to be "simple" - My site is down and I'm in panic mode. Here's what I did:

 

-Attempted to install SEO URLs, when it didn't work, I decided that I should get someone who knows what they're doing to install for me.

-I went backwards through the instructions and changed everything back to the way it was

-Checked to make sure all was good again, and all I'm getting is error messages on the main page:

Parse error: syntax error, unexpected '}' in /home/cardinalskate/cardinalskateboarding.com/includes/application_top.php on line 280

 

Please help!

 

Thanks in advance.

Link to comment
Share on other sites

How modified is the site? try a fresh download and a new Application_top,php

 

In future before modding a file please keep a backup.

Link to comment
Share on other sites

I just installed thi code for my web. It's quite good. But I look for Header SEO Tags. The code does not included the Header CEO Tags.

 

I try to use UNIQUE META, but it only show description and keywords the same as every pages. I don't know which code the keywords and description can be change every catergory and every producr.

 

Which Header SEO Tags can be run with this code?

 

Give me advice.

Thanks

 

Any well written script will run with this, all it does is generate URLs. Some scripts like header tags SEO do/or used to break when any correct path based URI was introduced.

Link to comment
Share on other sites

Great piece of software!

 

One thing I noticed when I installed it was my Header SEO Tags would NOT show the product information anymore after installing SEO URLS 5. Any thoughts on this?

 

Speak to the supporter of the contrib. Any contrib should work with this. Header tags seo is/or was poorly coded and broke whenever path based URIs were introduced.

Link to comment
Share on other sites

BTW apologies for the lack of response, I set this to follow and it seems as though it unset.

Link to comment
Share on other sites

The original Ultimate seo urls is old code dating from 2002 and built by a guy who is sadly dead.

 

It is still currently being supported but USU5 offers a lot more and is far newer code.

 

Entirely up to you .. also if anyone tells you about "lack of compatibility" it is rubbish.

Link to comment
Share on other sites

You don't need the old validation, that was validation off Chemos old version.

 

You should upgrade Security Pro to the latest.

Link to comment
Share on other sites

How can I modify the rewrite url like this

www.mysite.com/rebok/trainers/my-great-product-p-32.html >>> www.mysite.com/rebok/trainers/p-32-my-great-product.html

 

You would need to modify the files in: -

 

catalog/includes/modules/ultimate_seo_urls5/page_modules/

 

you would also need to modify the RewriteRules in .htaccess.

Link to comment
Share on other sites

Great contribution, installed on OSC2.3.1, vanilla install on a RHEL box (running Plesk 11) - The pages all seem to load as you'd expect, URLs all rewrite perfectly and navigation doesn't seem to have any issues.

 

However, checking the server headers I am getting 404's being returned. Disabling USU in the admin panel turns these back to 200's and re-enabling gives the 404. Note the pages still load fine in a browser, but its the headers that are bouncing, which is giving sitemap errors and such with Google (the rich snippets tool will not pickup the pages either, although it picks up the snippets when you paste in the HTML).

 

We are intending to use this mainly for aesthetic reasons (i.e. the URL looks more relevant on display to the user rather than being genuinely much better for SEO gaming purposes).

 

Any ideas where to start? I've spent an hour or two looking over the configs and everything -seems- to be fine.

Link to comment
Share on other sites

@@walmslei

 

Strange problem.

 

Please try removing all .htaccess rules except for those of USU5 temporarily and re test.

 

The only time USU5 issues a 404 header is when no link text was found for the url in the page module which then sets the variable page_not_found to true, this subsequently triggers the header to be generated in Usu_Validator.

Link to comment
Share on other sites

Hi

 

Thanks for the reply.

 

Looking at it with fresher eyes this morning, hacking 'validator.php' and taking the following block of code:

 

if ( false !== Usu_Main::i()->getVar( 'page_not_found' ) ) {

// $this->pageNotFound();

}

// If the incoming uri and the newly created uri do not match then we need to 301 redirect to the new.

if ( Usu_Main::i()->getVar( 'request_compare_in' ) != Usu_Main::i()->getVar( 'request_compare_new' ) ) {

// $this->redirect( $new_url );

}

 

I know its fairly obvious (as I've rem'd out the calls to the 404 and 301), but the URLs keep working as they were yesterday and the invalid server headers are now gone. So, the header is definitely coming from USU5, but its not immediately obvious what its not liking.

 

I'll put some logging into those procedures, see if I can't draw something out of it - If I do I'll post it up later this afternoon as this one had me pulling my hair out yesterday.

Link to comment
Share on other sites

Okay, before each of those calls to $this-> which are remarked out above, I put the following:

 

For the 404:

 

$myFile = "log.txt";

$fh = fopen($myFile, 'a') or die("can't open file");

fwrite($fh, "Request404:".remove_session_id( htmlspecialchars_decode( Usu_Main::i()->getVar( 'original_request_uri' ) ) )."\n");

fclose($fh);

 

And for the redirect:

 

$myFile = "log.txt";

$fh = fopen($myFile, 'a') or die("can't open file");

fwrite($fh, "Request301:".remove_session_id( htmlspecialchars_decode( Usu_Main::i()->getVar( 'original_request_uri' ) ) )."\n");

fclose($fh);

 

My log.txt file then contained the following entries:

 

Request404:/xyz-p-32.html

Request301:/xyz-p-32.html

 

However, there is an interesting point to note here - It only appends to the file log.txt when it is called from an external source - If you open this in a browser and jump around the site, the log file doesn't grow BUT if you access it via an external source (i.e. any one of the hundreds of server header checkers) then the log file -does- grow.

Link to comment
Share on other sites

@@walmslei

 

In both cases you have shown only the original request ..

 

I'd like to see Usu_Main::i()->getVar( 'request_compare_new' ) as a comparison.

Link to comment
Share on other sites

Okay,

 

From an internal source, calling a regular rewritten URL we get the following (I shifted the logging out of the if statements so we log on every page, not just if the condition is true).

 

Request Original:/pleatco-pma30-2002-p-32.html

Request New:/pleatco-pma30-2002-p-32.html

 

 

If we call a page via a browser using the standard osCommerce URL (product_info.php..) then the URL rewrites automatically in the browser and the log file contains:

 

Request Original:/product_info.php?products_id=32

Request New:/pleatco-pma30-2002-p-32.html

 

Request Original:/pleatco-pma30-2002-p-32.html

Request New:/pleatco-pma30-2002-p-32.html

 

Note one page request gives two calls to the validator, presumably as intended - I assume its recursive in that it keeps calling the URL to make sure it has a positive match.

 

Now, this is where it gets odd. If we call www.xyz.co.uk/pleatco-pma30-2002-p-32.html from a validator or server header checker we get the following:

 

Request Original:/pleatco-pma30-2002-p-32.html

Request New:

 

Note that Request New is NULL

 

I tried (probably a little too hopefully), to wrap the $this-> calls to the 404 and the 301 with IF statements to check for NULL, and of course, it returns a perfect 200, but the problem is if you call products_info.php from an external source (not the rewritten URL) then you don't get a 301, you get a 200, which will means Google is gonna pick it up as a dupe.

Link to comment
Share on other sites

@@walmslei

 

Okay now on one of those "external sources" point it at pleatco-pma30-2002-p-32.html and print to log the contents of $_SERVER pls. ( just put [REPLACED] where you comment out any sensitive data ).

Link to comment
Share on other sites

Request Original:/pleatco-pma30-2002-p-32.html

Request New:

REDIRECT_PP_CUSTOM_PHP_INI - /var/www/vhosts/xyz.co.uk/etc/php.ini

REDIRECT_STATUS - 200

PP_CUSTOM_PHP_INI - /var/www/vhosts/xyz.co.uk/etc/php.ini

HTTP_HOST - www.xyz.co.uk

HTTP_CONNECTION - Close

PATH - /sbin:/usr/sbin:/bin:/usr/bin

SERVER_SIGNATURE -

SERVER_SOFTWARE - Apache

SERVER_NAME - www.xyz.co.uk

SERVER_ADDR - 192.168.10.25

SERVER_PORT - 80

REMOTE_ADDR - 194.146.226.133

DOCUMENT_ROOT - /var/www/vhosts/xyz.co.uk/httpdocs

SERVER_ADMIN - .co.uk"]abc@@abc.co.uk

SCRIPT_FILENAME - /var/www/vhosts/xyz.co.uk/httpdocs/product_info.php

REMOTE_PORT - 53180

REDIRECT_URL - /pleatco-pma30-2002-p-32.html

GATEWAY_INTERFACE - CGI/1.1

SERVER_PROTOCOL - HTTP/1.0

REQUEST_METHOD - GET

QUERY_STRING -

REQUEST_URI - /pleatco-pma30-2002-p-32.html

SCRIPT_NAME - /product_info.php

PHP_SELF - /product_info.php

REQUEST_TIME - 1344951486

Link to comment
Share on other sites

Validator.php line 132

 

$new_url = htmlspecialchars_decode( tep_href_link( Usu_Main::i()->getVar( 'filename' ), Usu_Main::i()->getVar( 'request_querystring' ) ) );

 

Add above it some code to output to log three things: -

 

1) Usu_Main::i()->getVar( 'filename' );

2) Usu_Main::i()->getVar( 'request_querystring' );

3) tep_href_link( Usu_Main::i()->getVar( 'filename' ), Usu_Main::i()->getVar( 'request_querystring' ) )

Link to comment
Share on other sites

Okay, this may be getting somewhere nearer the mark - The first three lines show a request made by browsing the site:

 

product_info.php

osCsid=n88c0nv37k820m8o8d19fulak0&products_id=1

http://www.xyz.co.uk/pleatco-pww50-spa-filter-p-1.html

 

The next FIVE lines show a request made from an external server header checker - It appears to be having a second go at it, despite, but isn't dragging anything out on tep_href_link( Usu_Main::i()->getVar( 'filename' ), Usu_Main::i()->getVar( 'request_querystring' ) ) on the second pass (its a null line)

 

 

product_info.php

products_id=1

http://www.xyz.co.uk/pleatco-pww50-spa-filter-p-1.html

product_info.php

products_id=1

Edited by walmslei
Link to comment
Share on other sites

Could you send me by email your includes/configure.php please. ( no need to edit I'm safe :) )

 

admin at [my forum name no spaces] dot co dot uk

 

Have you got live HTTP headers extension installed in firefox? the two instances must be a 301 redirect.

Link to comment
Share on other sites

The confusing thing here is that tep_href_link() is a standard osCommerce wrapper

 

We know products_info.php is in place and we know that products_id=1 is in place.

 

Therefore the following MUST produce a link ( certainly not return null )

 


tep_href_link( 'product_info.php',  'products_id=1' )

Edited by FWR Media
Link to comment
Share on other sites

Ok another test.

 

1) Turn of gzip compression, if on.

 

2) at the top of method validate() put: -

 


 // TEMPORARY TEST
 $old_reporting_level = error_reporting();
 error_reporting( E_ALL | E_STRICT );
 ob_start();

 

Immediately above the following: -

 

if ( false !== Usu_Main::i()->getVar( 'page_not_found' ) ) {

 

Add

 

  // TEMPORARY TEST
 $any_output = ob_get_contents();
 ob_end_clean();
 error_reporting( $old_reporting_level );

 

 

Log the contents of $any_output ( using a failure access type ).

Edited by FWR Media
Link to comment
Share on other sites

The output file doesn't show any errors directly - I cranked up error reporting in Apache, and took them from the error_log via SSH instead which will hopefully show the same results.

 

 

PHP Notice: Undefined variable: padding in /pathtofile/httpdocs/includes/modules/boxes/bm_categories.php on line 40

{this repeats about ten times)

 

then

 

Undefined index: @@@lang@@ in /pathtofile/httpdocs/includes/classes/language.php on line 77

 

then

 

File does not exist: /pathtofile/httpdocs/fancybox

 

 

Thats all.

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.

 Share

×
×
  • Create New...