Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

gregNwt

Members
  • Content count

    62
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Greg Matheson
  1. Do you have any other contibs that affect the url like Ultimate SEO urls ... ? I had an issue with the php_self variable returning a rewritten url which had HTC fail to recognize the page was to have header tags inserted ... If you dont have re-written urls my tip wont be of much use :)
  2. How about just adding those lines from the root level .htaccess to the one in catalog/ ? RewriteCond %{HTTP_HOST} !^www.triodisplay.com$ [NC] RewriteRule ^(.*)$ http://www.triodisplay.com/$1 [L,R=301] Just a guess :)
  3. Have 2 .htaccess files one in the root / for the domain.com to www.domain.com and the other in the catalog directory for the url-product re-writes ?
  4. They both end up doing the same sort of thing, making URLs more friendly, I can only say that I use ultimate seo urls and it works :) What is the support traffic like in the SEO-G contrib ?
  5. Also your re-written URLS are failing https://www.motorbikesandparts.co.uk/produc...ackrest+for+E26 The requested URL /product/10487/Givi+Backrest+for+E26 was not found on this server. In the OSC Admin control panel in the Configuration section, you should have a SEO Urls item, turn off SEO urls and see if things better ?
  6. Well there you are just plain wrong. The contribs are installed correctly and the test in includes/header_tags.php for which page to put header tags in is not good enough for some server environments. Both contribs worked fine untill the ISP changed the apache/php environment. As I stated if your server responds with a re-written URL to the $_SERVER['PHP_SELF'] the test is not good enough. Perhaps a more elegant way to test would be to use a substring of a different php $_SERVER variable that responds with the filename not the url, and matches the constants. My 30 second fix by testing for a SEO signature works, but could be better. On the INDEX.PHP and PRODUCT_INFO.PHP tests in that header_tags.php file, the test will fail when the server response does not match the defined constants, and I suggest trying to understand how things work is a good thing. Many thanks for your input, your suggestions that :- >my SEO urls were being re-written incorretly [you were right there!] >this was SEO problem, [not so] >that the 2 contribs just work together, [in a perfect world] >that I should just get them installed properly, [they are and were] >how [htc] figures out the url, it doesn't. The url has nothing to do with Header Tags (and vice versa). [wrong] has made me find the problem. It is as I suspected a hosted ISP apache/php server setup issue that I have little or no control over. HTC does figure out the URL by using the $_SERVER variable and tests it against the defined constants in includes/header_tags.php This test is inadequate on servers where $_SERVER['PHP_SELF'], or $PHP_SELF is a re-written URL. case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT) ): Thanks for you help, it is appreciated. Now HTC and SEO Urls work on my hosts server, once again. The combination of these 2 contribs is I believe critical to good site placement, as I have learnt the hard way in the 6 weeks or so that the server environment had changed. Cheers.
  7. Well I have found a cause of the problem and here is the fix.... I found the error by echoing the $_SERVER['PHP_SELF'] at the bottom of my product_info.php page. The cause of Header tags controller and SEO urls not working together is where server responds with the re-written url as the variable. HTC looks for a match between this variable and a defined constant , when the test fails you get no header tags added to your re-written SEO url page. The fix is to add to the test to look for a SEO signiture in the $_SERVER['PHP_SELF'] variable. So for my Index.php section of catalog/includes/header_tags.php is used // INDEX.PHP case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT) or strpos($_SERVER['PHP_SELF'],"-c-") ): and for product_info.php // PRODUCT_INFO.PHP case ( strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCT_INFO) or strstr($PHP_SELF,FILENAME_PRODUCT_INFO) or strpos($_SERVER['PHP_SELF'],"-p-")): I hope this helps someone other than myself!! :) Note I suspect there is some server issue causing this behaviour as all was well untill my host ISP upgraded the apache environment ... This will only fix the HTC and SEO urls working together where the server gives the re-written URL as the $_SERVER['PHP_SELF'] variable. From what I read in the HTC forum, mostly there is not a problem!!
  8. A better test for SEO and HTC where a server $SERVER['PHP_SELF'] is the SEO url not the defined FILENAME_PRODUCT_INFO or FILENAME_DEFAULT constants. I have added the test for "-p-" and "-c-" for the product_info pages and the index pages into the existing test to allow HTC to work with both SEO on and off. // PRODUCT_INFO.PHP case ( strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCT_INFO) or strstr($PHP_SELF,FILENAME_PRODUCT_INFO) or strpos($_SERVER['PHP_SELF'],"-p-")): // INDEX.PHP case (strstr($_SERVER['PHP_SELF'],FILENAME_DEFAULT) or strstr($PHP_SELF,FILENAME_DEFAULT) or strpos($_SERVER['PHP_SELF'],"-c-")) : So much happier now I have got to the bottom of the problem.
  9. Yes, I noticed that HTC was not working correctly :) So do you mean that HTC does not look at a calling URL, but just relies on the HTC additions to pages like index.php and product_info.php to determine if it should add tags..(based on the text control page)? Say for the product_info page we have .... // BOF: Header Tag Controller v2.6.0 updated to 2.63 if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <title><?php echo TITLE; ?></title> <?php } // EOF: Header Tag Controller v2.6.0 And in the included header_tags.php the case of PRODUCT_INFO.PHP case ( strstr($_SERVER['PHP_SELF'],FILENAME_PRODUCT_INFO) or strstr($PHP_SELF,FILENAME_PRODUCT_INFO) ): This line appears to be saying that if the Constant FILENAME_PRODUCT_INFO (in my case define('FILENAME_PRODUCT_INFO', 'product_info.php'); matches the $_SERVER['PHP_SELF'] variable then set the $tags_array Perhaps this is the cause of the problem... My $_SERVER['PHP_SELF'] looks more like a SEO url than the FILENAME_PRODUCT_INFO constant. Echoing the $_SERVER['PHP_SELF'] variable at the bottom of my product_info page, shows it for example is :- Page Name /catalog/voltage-reducer-p-759.html So according to the case of 'product_info.php' in header_tags.php the $_SERVER['PHP_SELF'] variable will NOT match the constant FILENAME_PRODUCT_INFO and so no tags_array is set for use in the product_info.php page ..... Perhaps a better test would make make things come good ...... say use a re-written url signiture like "-p-" for a product page and "-c-" index page .... Thanks for the help.
  10. RE HTC and SEo Urls and how HTC knows to add tags to re-written urls Thanks Jack, The HTC contrib is filling tags nicely, all products descriptions have HTC elements added, and I can see SEO urls using the product_name to make a new url. I still need to get a grip on how HTC understands a re-written url. My issue is that with pages that have re-written URLs, HTC does not add the correct headers. http://www.rpc.com.au/catalog/index.php [gets the 'index' HTC headers from Text Control Page ] eg http://www.rpc.com.au/catalog/accessories-c-1_105.html [gets the 'Default' HTC headers from Text Control Page, not the text setup for index.php] What I am trying to figure is how does HTC know that a browser calling the above page, is really wanting the http://www.rpc.com.au/catalog/index.php?cPath=105 page, that HTC is configured to add headers too ..?? I did think that both these contribs were working untill the ISP did a server upgrade....and is why Im trying to get to the logic of how SEO and HTC work together .... Cheers.
  11. A question to help me understand how HTC works especially when SEO URLs are being re-written. I have SEO urls that seems to change all URLS to category pages from http://www.rpc.com.au/catalog/index.php?cPath=105 to http://www.rpc.com.au/catalog/appliances-c-1.html (similar to product pages) http://www.rpc.com.au/catalog/product_info...?product_id=624 is re-written http://www.rpc.com.au/catalog/ttowel-energ...ture-p-624.html How does HTC know that the re-written url is really one of the pages that HTC is setup for (index.php, products_info.php) ?? eg If I call the SEO re-written url http://www.rpc.com.au/catalog/appliances-c-1.html HTC wont add the header tags. Are there any server setup issues that may make the 2 contribs not work together ???
  12. Hi All My problem is that my SEO urls work well and page URLS are re-written nicely. but my Header Tags Controller cant find these pages to add the meta tags too them. I thought I had this working, but possibly some changes by the host ISP and the Apache setup has made things stop working. All my categories/product page urls in the items selection box are delivered to my browser as the re-written SEO URLs eg http://www.rpc.com.au/catalog/appliances-c-1.html not http://www.rpc.com.au/catalog/index.php?cPath=105 When I follow the re-written links HTC cant seem to add any headers. If I manually call the original URLS the meta tags are added. It seems as though the server is re-writing the URLS as they are delivered to the browser. Is SEO urls designed to re-write the outgoing page/url content from the server ?? I was thinking perhaps that it was the URL requests inbound to the server that would be re-written, and the pages dished up by the server would have the standard OSC URLs As it stands it seems that I never actually call the standard OSC URLs as they have been re-written by the mod_rewrite function of SEO urls, and this is why HTC cant add any tags.... Any suggestions ????
  13. This looks like one of the different URL rewite contributions. Maybee SEO-G Ultimate SEO Urls get re-written to look like for categories http://www.rpc.com.au/catalog/accessories-c-1_105.html for products http://www.rpc.com.au/catalog/voltage-reducer-p-759.html Noice your URLs are re-written to have slashes / in them to seperate the elements not dashes - http://www.parakeetprint.co.uk/product_inf.../products_id/98
  14. The SEO URL is not correct as it has not been populated with the category name This is an error induced by the Mysql (vs 5 ) version if I remember right. There is a fix for it in the contribution home here http://www.oscommerce.com/community/contributions,2823 Look for the Fixed Version 2 file to download. It may not fix your problem, but the URLs from Ultimate Seo Urls will be more correct....
  15. It looks like you are refering to another contrib. Ultimate SEO Urls. This is the header tags controller forum. So it is a bit unclear if your are having a problem with HTC contrib at all ??? Fix the Ultimate SEO URL and your error message may go away. But if you are having a problem with the HTC contrib, (which changes the Meta tags Title Keyword and Description ), Turn it off in your admin configuration panel the SEO urls and see if the HTC works. But I suspect you have no HTC.
×