Jump to content

cactustactical

Members
  • Content count

    55
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Bob Hodge
  1. cactustactical

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Jack, using Ultimate SEO Urls 2.1d and it works just peachy. Problem comes in from the re-written seoclass.php of r-172 as was written about several days ago. Nothing wrong in the shop as the orders continue to pour in. :-)
  2. cactustactical

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    I did go back through the instruction set tonight and found that all changes had been made as directed with the contribution. With the re-written seoclass.php, we get urls such as: http://www.cactustactical.com/osc/php4?cPath=464&filter_id=39 Putting the seoclass.php back from 2.1d, the url is redirected as: http://www.cactustactical.com/osc/german-sport-guns-c-464.html?filter_id=39. As mentioned previously, I do not back out the changes other than the re-written seoclass.php and things work fine, so something in the seoclass.php is toxic to how the site is setup. At this point, other than being a matter of curiousity as to why this is happening, I am content to leave 2.1d live as we work towards php5. We were trying to reduce script execution time a bit and this would have helped. regards
  3. cactustactical

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Ultimate Seo Urls 2.1d STABLE FINAL r172 is a re-write of Ultimate SEO Urls 2.1d. I have not moved on past 2.1d in the past as the additional functionality of the later versions are not needed as we were interested only in the URl re-write functionality. But, thanks for the comments.
  4. cactustactical

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    The web site is http://www.cactustactical.com. Not sure how a server change would come into play. The re-direct process works fine with the original 2.1 version we have been using. I switched over to the r-172 final and things go a bit of hay wire with redirects failing and php4 appearing in the url. This has happened several times as I have installed, backed out and re-installed r 172 final on the off chance I did something in error. It does the samee thing each time. I switch the seoclass.php back to the original 2.1 version and things re-direct properly. It is something in r 172 that seems to be causing the issue. We are currently live using the original 2.1 seoclass. php in conjunction with the few other changes from r 172 and everything works fine. We have tried to move to php 5, but get a few errors when doing so. Those are being worked out on a test server in the spare time. regards
  5. cactustactical

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Anyone have any thoughts on this? Something in the Final r-172 seo-class.php is causing *.php to be re-written as *.php4 adn I don't see it Everything else works out of final r-172, seo-class.hp is causing the error previosuly described. Any constructive thoughts would be appreciated. regards
  6. cactustactical

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    We have been using USU v2.1d Original for several years without a bit of trouble. In it a fit of exuberance, I decided to try the cleaned up Ultimate Seo Urls 2.1d STABLE FINAL r172. With 2.1 original, we would see a url such as: http://www.cactustactical.com/osc/ace-stocks-c-453.html'>http://www.cactustactical.com/osc/ace-stocks-c-453.html which was the translated url for: http://www.cactustactical.com/osc/index.php?cPath=453.'>http://www.cactustactical.com/osc/index.php?cPath=453. Now with 2.1d Stable Final r172, we get: http://www.cactustactical.com/osc/php4?cPath=453 The index. has been lost from the url and php has been changed to php4. This happens for every manufacturers, categories and products page. What we get is the 404 redirect since the url is incomplete. What is interesting is that if the old seo-class.php script is put back, the contribution works fine with the other Final r172 changes. So, the issue is coming out of the seo-class.php script. Looked for a similiar issue, but have not seen anything of this sort since Final r172 was made live. Anyone have any ideas?
  7. cactustactical

    Custom Server Error Pages

    Jack, I was pretty sure that it was related to a version of Ultimate SEO Urls and dipped into what we had installed for that. I did find that FWR Media had included a worthwhile addon to USU which does the following, attempts to prevent Google duplicate content penalties by correcting typos in urls entered to what it thinks should be the correct value. in functions/general.php, adds the following code. I have bolded the relevant section. Basically, if a url can not be corrected ( in my case, entering an incomplete url without the php or html, nothing happens) but, if a full url is entered which can not be corrected, it forces a default 404 page, bypassing what is done in the error document contribution. This is a worthwhile addon as it does correct mis-typings, so I will play around with it a bit and see what I can come up. Will also contact Robert and let him know of this situation. ################################################ // fwrmedia.co.uk mod to check SEO link validity function tep_validate_seo_urls() { global $HTTP_GET_VARS, $request_type; ( $request_type == 'NONSSL' ? $fwr_server_port = HTTP_SERVER : $fwr_server_port = HTTPS_SERVER ); $querystring = str_replace('?', '&', $_SERVER['REQUEST_URI']); if (isset($HTTP_GET_VARS['products_id'])) $get_id_vars = str_replace(strstr($HTTP_GET_VARS['products_id'], '{'), '', $HTTP_GET_VARS['products_id']); // Remove attributes $qs_parts = explode('&', $querystring); // explode the querystring into an array $count = count($qs_parts); $added_uri = array(); $remove_nasties = array('%3C', '%3E', '<', '>', ':/', 'http', 'HTTP'); // We do tep_sanitize_string() later anyway for ( $i=0; $i<$count; $i++ ) { // We don't want to introduce vulnerability do we :) switch($qs_parts[$i]) { case(false !== strpos($qs_parts[$i], '.html')): $core = urldecode($qs_parts[$i]); // Found the path ( (strstr($core, '{') !== false) ? ($core = str_replace(strstr($core, '{'), '', $core) . '.html') : NULL ); // Remove attributes break; case(false !== strpos($qs_parts[$i], 'osCsid')): $seo_sid = $qs_parts[$i]; // Found the osCsid break; default: $added_uri[] = ( urldecode(str_replace($remove_nasties, '', $qs_parts[$i])) ); // Found the additional querystring (e.g. &page=3&sort=2a from split_page_results) } } $do_validation = true; // Set to false later if it is not an seo url so that other .html files pass through unhindered // If -x- is in the querystring create var $querytype which is a string which explodes into an array on - ( strpos($_SERVER['REQUEST_URI'], '-p-') ? ($querytype = 'filename_product_info-products_id=' . $get_id_vars) : ( strpos($_SERVER['REQUEST_URI'], '-c-') ? ($querytype = 'filename_default-cPath=' . $HTTP_GET_VARS['cPath']) : ( strpos($_SERVER['REQUEST_URI'], '-m-') ? ($querytype = 'filename_default-manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']) : ( strpos($_SERVER['REQUEST_URI'], '-pi-') ? ($querytype = 'filename_popup_image-pID=' . $HTTP_GET_VARS['pID']) : ( strpos($_SERVER['REQUEST_URI'], '-t-') ? ($querytype = 'filename_articles-tPath=' . $HTTP_GET_VARS['tPath']) : ( strpos($_SERVER['REQUEST_URI'], '-a-') ? ($querytype = 'filename_article_info-articles_id=' . $HTTP_GET_VARS['articles_id']) : ( strpos($_SERVER['REQUEST_URI'], '-pr-') ? ($querytype = 'filename_product_reviews-products_id=' . $get_id_vars) : ( strpos($_SERVER['REQUEST_URI'], '-pri-') ? ($querytype = 'filename_product_reviews_info-products_id=' . $get_id_vars) : ( strpos($_SERVER['REQUEST_URI'], '-prw-') ? ($querytype = 'filename_product_reviews_write-products_id=' . $get_id_vars) : ( strpos($_SERVER['REQUEST_URI'], '-i-') ? ($querytype = 'filename_information-info_id=' . $HTTP_GET_VARS['info_id']) : ( strpos($_SERVER['REQUEST_URI'], '-links-') ? ($querytype = 'filename_links-lPath=' . $HTTP_GET_VARS['lPath']) : $do_validation = false )))))))))) ); if ( true === $do_validation ) { // It's an SEO URL so we will validate it $validate_array = explode('-', $querytype); // Gives e.g. $validate_array[0] = filename_default, $validate_array[1] = products_id=xx $linkreturned = tep_href_link(constant(strtoupper($validate_array[0])), $validate_array[1]); // Get a propper new SEO link // Rebuild the extra querystring ( (strpos($linkreturned, '?') !== false) ? ($seperator = '&') : ($seperator = '?') ); // Is there an osCsid on $linkreturned? $count = count($added_uri); // Count the extra querystring items for ($i=0; $i<$count; $i++) if ($i == 0) $linkreturned = $linkreturned . $seperator . tep_sanitize_string($added_uri[$i]); //add the first using seperator ? or & else $linkreturned = $linkreturned . '&' . tep_sanitize_string($added_uri[$i]); // Just add "&" this time $linkreturnedstripped = str_replace( strstr($linkreturned, '?'), '', $linkreturned); // Strip osCsid to allow a match with $core $linktest = str_replace($fwr_server_port . DIR_WS_HTTP_CATALOG, '', $linkreturned); // Pair the url down to the querystring 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 exit; } else if ( $fwr_server_port . $core != $linkreturnedstripped ) { // Link looks bad so 301 $linkreturned = str_replace('&', '&', $linkreturned); // Just in case those sneaky W3C urls tried to throw in an & header("HTTP/1.0 301 Moved Permanently"); // redirect to the good version header("Location: $linkreturned"); // 301 redirect exit; } } // We're not doing validation as the -p-, -c- etc was not found } 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") . '<p align="left" style="font-size: large;"> 404 Page not found!</p> <div align="center" style="width: 100%; margin-top: 70px;"> <div align="center" style="font-family: verdana; font-size: 0.8em; color: #818181; padding: 90px 10px 90px 10px; width: 60%; border: 1px solid #818181;"> This product/category does not exist it may have been deleted.<p /> To return to ' . STORE_NAME . '. Please click here <a href="' . tep_href_link(FILENAME_DEFAULT) . '" title="' . STORE_NAME . '">back to ' . STORE_NAME . '</a> </div></div>';} ################################################ // END fwrmedia.co.uk mod to check SEO link validity
  8. cactustactical

    Custom Server Error Pages

    The errordocument code is set at the beginning of htacess and the same result occurs: enter an incomplete url ( http://www.mysite.com/junk )and the contribition error page is displayed enter the complete url ( http://www.mysite.com/junk.php) and the default IE 404 error page displays. Per your suggestion, entered http://www.mysite.com/shippings.php ( extra s on the end of shipping) and the shipping page is returned properly. But entered 2 extra 's' on the end of shipping.php and the default IE 404 page is displayed. Do you use the Ultimate SEO Url's contribution on the site that you have added this contribution to? Wondering if the rewrites for that are causing a problem with the code.
  9. cactustactical

    Custom Server Error Pages

    I figured it would be in htaccess since the contribution page appears when entered directly in the command line, but the puzzler is that I copied the hatacess code straight from the contribution and only changed the directory name to match my structure. What would be the mistake below and if something was mistyped, why would it work on an incomplete url and not on a complete url? ErrorDocument 400 /osc/server_error.php?id=400 ErrorDocument 401 /osc/server_error.php?id=401 ErrorDocument 402 /osc/server_error.php?id=402 ErrorDocument 403 /osc/server_error.php?id=403 ErrorDocument 404 /osc/server_error.php?id=404 ErrorDocument 405 /osc/server_error.php?id=405 ErrorDocument 406 /osc/server_error.php?id=406 ErrorDocument 407 /osc/server_error.php?id=407 ErrorDocument 408 /osc/server_error.php?id=408 ErrorDocument 409 /osc/server_error.php?id=409 ErrorDocument 410 /osc/server_error.php?id=410 ErrorDocument 411 /osc/server_error.php?id=411 ErrorDocument 412 /osc/server_error.php?id=412 ErrorDocument 413 /osc/server_error.php?id=413 ErrorDocument 414 /osc/server_error.php?id=414 ErrorDocument 415 /osc/server_error.php?id=415 ErrorDocument 416 /osc/server_error.php?id=416 ErrorDocument 417 /osc/server_error.php?id=417 ErrorDocument 421 /osc/server_error.php?id=421 ErrorDocument 422 /osc/server_error.php?id=422 ErrorDocument 423 /osc/server_error.php?id=423 ErrorDocument 424 /osc/server_error.php?id=424 #ErrorDocument 425 /osc/server_error.php?id=425 #ErrorDocument 426 /osc/server_error.php?id=426 #ErrorDocument 449 /osc/server_error.php?id=449 ErrorDocument 500 /osc/server_error.php?id=500 ErrorDocument 501 /osc/server_error.php?id=501 ErrorDocument 502 /osc/server_error.php?id=502 ErrorDocument 503 /osc/server_error.php?id=503 ErrorDocument 504 /osc/server_error.php?id=504 ErrorDocument 505 /osc/server_error.php?id=505 ErrorDocument 506 /osc/server_error.php?id=506 ErrorDocument 507 /osc/server_error.php?id=507 ErrorDocument 508 /osc/server_error.php?id=508 ErrorDocument 509 /osc/server_error.php?id=509 ErrorDocument 510 /osc/server_error.php?id=510
  10. cactustactical

    Custom Server Error Pages

    Jack, I installed the new version of the contribution and it seems to work some of the time. If I type in an incomplete url: http://www.mysite.com/osc/garbage , the custom contribution 404 page appears. If I type in a complete, not found url: http://www.mysite.com/osc/garbage.php the default 404 page appears. Is this the issue that you found when you installed or is there something else that would be causing this? Bob
  11. cactustactical

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    No need to have a stroke, if you go back and read the message trail, that is what I have been trying to get you to confirm for almost a month. thanks.
  12. cactustactical

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    As I have thought all along, this is a gap in the USU's contribution, it does not convert standard osc box forms which are written in this fashion. You can say that it has nothing to do with USU, but I prefer to look at it as an opportunity to close a gap in the contribution. This is not a home grown box, this is one provided by the project and probably used in 100's of stores. Why have a contribution which is supposed to increase SEO, but does not convert all url's, leaving Google, in its odd wisdom during a spider scan, to perhaps penalize a site for duplicate content? I do appreciate the script provided containing alternate code and javascript, I will look at it and see if it can used or modified to fit within the existing box process.
  13. cactustactical

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Bingo, I would expect USU to re-write the url and it is not. That has been the point I am trying to get across. The url simply comes through to the new page as standard osc, it is not being converted. This is standard USU 2.1d as taken from your contribution using STS. Every other url on this site: a direct hyperlink, rss output, xml output, converts as expected, these 2 forms do not. And they are the only url's built in this fashion. And it is not clear why. The only reason I can think of is that the url is built in the tep_draw_form and tep_draw_pull_down_menu builds the mfgr's id as opposed to a url built in 1 step using tep_href_link only.
  14. cactustactical

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Robert, I placed all the info in this thread while you were offline, it appears that you missed it. My contention is as follows: the Manufacturers box builds the form using the following code in html_output.php: $info_box_contents = array(); $info_box_contents[] = array('form' => tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get'), 'text' => tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100% "') . tep_hide_session_id()); } new infoBox($info_box_contents); The html form that is built looks as follows: <!-- Start Category Menu --> <form name="goto" action="http://www.xxxx.com/osc/index.php" method="get"><select name="cPath" onChange="this.form.submit();"><option value="0">Please Select</option><option value="410">Specials</option><option value="425">Closeouts</option><option value="454">A & G</option><option value="22">Accu Wedge</option><option value="453">Ace Stocks</option> and so on for the rest of the form, ending with: </select></form> <!-- End Category Menu --> the first script line which contains the tep_href_link: $info_box_contents[] = array('form' => tep_draw_form('manufacturers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get'), returns a result of <form name="goto" action="http://www.xxxx.com/osc/index.php" method="get"><select name="cPath" onChange="this.form.submit();"> the array portion of the script which uses tep_draw_pull_down_form: 'text' => tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($HTTP_GET_VARS['manufacturers_id']) ? $HTTP_GET_VARS['manufacturers_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100% "') . tep_hide_session_id()); returns results of <option value="0">Please Select</option> <option value="410">Specials</option> <option value="425">Closeouts</option> <option value="454">A & G</option> and so on. the end result is a form which does not contain a complete url. Clicking on a line in the form takes you to the correct page with the standard oscommerce url visible. My contention is that USU's was written to handle forms such as this. This is standard out of the box code from USU and STS both. No changes have been made. Simply stating tep_href_link works and the problem is elsewhere is ignoring what I am trying to get across. Each form line does not contain a full url, does not call tep_href_link and therefore can not be converted using the USU tep_href_link function. I can deal with this, what I have not been able to find is how oscommerce performs once a line in a form is selected. If I know what function or class is used, I could probably modify to work as USU. Your thoughts?
  15. cactustactical

    [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

    Robert, any further thoughts on the failure of USU's to convert url's out of a form under STS? I reviewed the code in detail, it is standard contribution code, nothing changed from package code, and in talking with a few very knowledgeable oscommerce resources, their opinion also is that Chemo did not code to handle url's out of box forms. It appears that Chemo did not expand his offering to take these box forms under consideration.
×