Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

boxtel

Archived
  • Posts

    5,134
  • Joined

  • Last visited

Everything posted by boxtel

  1. you could fix that by using tep_get_prid() in the function that writes the seo urls for products
  2. yes, that "test" stuff is not very smart and not necessary. all parameters including valids like language and currency and session ids get lost. you could have just set: $location = tep_href_link(basename($_SERVER['SCRIPT_NAME']),'products_id='.$_GET['products_id'].tep_get_all_get_params(array('products_id','page','sort')), $request_type);
  3. well, and ofcourse if you do not prevent spider sessions and when the user agent is void. but the former should never have been an option and the latter is obvious.
  4. the enquiry of spiders.txt is only skipped if you force cookies.
  5. steve, eventhough that contrib works flawlessly, it has one crucial limitation: RewriteCond %{HTTP_USER_AGENT} !(msnbot|slurp|googlebot) [NC] this implies that you need to add every spider known to mankind to this line, basically what you have been doing with spiders.txt. so why not re-use spiders.txt for that as realized in chemo's php version of this: if ( $spider_flag == true ){ if ( eregi(tep_session_name(), $_SERVER['REQUEST_URI']) ){ $location = tep_href_link(basename($_SERVER['SCRIPT_NAME']), tep_get_all_get_params(array(tep_session_name())), 'NONSSL', false); header("HTTP/1.0 301 Moved Permanently"); header("Location: $location"); // redirect...bye bye } } to be used in application_top.php after spider identification and in the event of seo url's after the inclusion of that class.
  6. well, in FF it shows after some delay and then flickers twice and in IE7 nothing ever shows at all as it produces a runtime error, the same applies to the shopping cart box by the way.
  7. well, it is not a bad idea to make those semi-static pages also "a little" more seo friendly if you will. You can use your keywords in the name just like seo url's does. That was a tip from Monika not so long ago. so you could make them: mainkeyword-special-offers.html storename-sitemap.html all-mainkeyword1-and-mainkeyword2-products-at-storename.html so all you would have to do is change the filenames. something like that.
  8. well, I do not know what that contribution does, I never cared much for html validation. Always seems to me like a rainy sunday afternoon homework excercise for people who want that little extra credit from their teachers or who have nothing to do. I always look to add value to the clients first. If they can prove that "validated html" actually adds value to my customers other than the business-wise irrelevant slogan "valid html" on my website, then I might consider it. I have not seen such evidence. But tep_href_link() in html_output.php would be a good place to start.
  9. well, like I said, I am not sure if the latest versions of seo url's already redirects old seo url's to new seo url's or whether it only redirects non-seo url's to seo url's. Maybe someone who uses those versions can say so I do not have to dig in that code to find out.
  10. you cannot add multiple occurrences of the same product to the cart as the cart's contents array uses the products_id as key. That is why the products_id for attributes is messed with to keep it unique for different attributes. So either follow the attribute trail or you would have to rewrite much in that class.
  11. I would look at that valid xhtml contrib first as I assume that is turning the url parameter separators into &. always correct things at the core iso trying to "fix" the resulting symptoms elsewhere.
  12. you have to come in as a spider as you would only do this for spiders. It basically is only an se index issue so there is no need to do the extra code execution for users. so use FF, disable cookies, set the useragent to a known spider and then the magic happens...
  13. that error generally happens if you redirect to the same page, i.e. in an endless loop.
  14. those are already semi-static pages in that they do not take parameters so there is no need for that. just rename all_products.php to All-of-my-products-are-to-be-seen-here.html
  15. I think this has more to do with your language file than your htaccess file.
  16. Correction here: if (basename($_SERVER['SCRIPT_NAME']) == 'product_info.php') { $incoming_url = $_SERVER['REQUEST_URI']; $compare1 = substr($incoming_url,1,strpos($incoming_url,'.html')-1); $compare2 = substr(str_replace(HTTP_SERVER,'',tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'products_id='.$_GET['products_id'])),1,strpos(str_replace(HTTP_SERVER,'',tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'products_id='.$_GET['products_id'])),'.html')-1); if ($compare1 != $compare2) { $location = tep_href_link(basename($_SERVER['SCRIPT_NAME']),'products_id='.$_GET['products_id'].tep_get_all_get_params(array('products_id')), $request_type); header("HTTP/1.0 301 Moved Permanently"); header("Location: $location"); } } if (basename($_SERVER['SCRIPT_NAME']) == 'index.php') { if (isset($_GET['cPath'])) { $incoming_url = $_SERVER['REQUEST_URI']; $compare1 = substr($incoming_url,1,strpos($incoming_url,'.html')-1); $compare2 = substr(str_replace(HTTP_SERVER,'',tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'cPath='.$_GET['cPath'])),1,strpos(str_replace(HTTP_SERVER,'',tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'cPath='.$_GET['cPath'])),'.html')-1); if ($compare1 != $compare2) { $location = tep_href_link(basename($_SERVER['SCRIPT_NAME']),'cPath='.$_GET['cPath']. tep_get_all_get_params(array('cPath')), $request_type); header("HTTP/1.0 301 Moved Permanently"); header("Location: $location"); } } } you can see (on my site) if you put this in application top after the seo class is included that you can edit the url in the address bar before the rewrite key all you like, it will always revert back to the valid one with a 301 redirect.
  17. like (could without doubt be coded more clean): if (basename($_SERVER['SCRIPT_NAME']) == 'product_info.php') { $incoming_url = substr($_SERVER['REQUEST_URI'],1,strpos($_SERVER['REQUEST_URI'],'.html')-1); $valid_url = substr(str_replace(HTTP_SERVER,'',tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'products_id='.$_GET['products_id'])),1,strpos(str_replace(HTTP_SERVER,'',tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'cPath='.$_GET['cPath'])),'.html')-1); if ($incoming_url != $valid_url) { $location = tep_href_link(basename($_SERVER['SCRIPT_NAME']),'products_id='.$_GET['products_id'].tep_get_all_get_params(array('products_id')), $request_type); header("HTTP/1.0 301 Moved Permanently"); header("Location: $location"); } } if (basename($_SERVER['SCRIPT_NAME']) == 'index.php') { if (isset($_GET['cPath'])) { $incoming_url = substr($_SERVER['REQUEST_URI'],1,strpos($_SERVER['REQUEST_URI'],'.html')-1); $valid_url = substr(str_replace(HTTP_SERVER,'',tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'cPath='.$_GET['cPath'])),1,strpos(str_replace(HTTP_SERVER,'',tep_href_link(basename($_SERVER['SCRIPT_NAME']), 'cPath='.$_GET['cPath'])),'.html')-1); if ($incoming_url != $valid_url) { $location = tep_href_link(basename($_SERVER['SCRIPT_NAME']),'cPath='.$_GET['cPath']. tep_get_all_get_params(array('cPath')), $request_type); header("HTTP/1.0 301 Moved Permanently"); header("Location: $location"); } } }
  18. potentially you could fix this ofcourse. I am not sure if the latest versions already do this, I don't have the latest versions, but when a page request comes in you could generate a new seo url based on the requests parameters and then compare if the incoming seo url is the same. If it is not, you give a 301 redirect to the current seo url.
  19. this is also the reason as to why you should add a 404 header in the paging class for when pages are requested which are no longer valid. say you used to have 3 pages of a product listing. the se's will have indexed /index.php?cPath=1 /index.php?cPath=1&page=1 /index.php?cPath=1&page=2 /index.php?cPath=1&page=3 but now you only have 2 pages left If the se comes back to get /index.php?cPath=1&page=3 he should get a 404, but not with osc, osc simply gives the content of page 2. So now the se has /index.php?cPath=1&page=2 and /index.php?cPath=1&page=3 and they both contain the same content, the content of /index.php?cPath=1&page=2 Mind you, /index.php?cPath=1 /index.php?cPath=1&page=1 have the same content by definition.
  20. you are missing the point. matrox-g200-one-p-1.html exists and will continue to exist alongside matrox-g200-two-p-1.html and se's will continue to find both pages and index both pages. The point was that you now have 2 different url's which point to the very same page.
  21. se's will index what you give them so if today the url of product X is called matrox-g200-one-p-1.html and tomorrow matrox-g200-two-p-1.html then they both get indexed ofcourse as they are both different url's. That they internally translate to the same content page is not the se's concern. So if you keep changing product names then yes, you will have duplicate pages and they will remain duplicate forever as the se will revisit and both url's will result in a nice valid page. The same as urls /index.php?cPath=12 and /index.php?cPath=12&page=1 and /index.php?cPath=12&language=en and /index.php?cPath=12&page=1&language=en etc. what the exact consequences are wrt ranking is anybodies guess but the se's themselves. So to be on the safe side, reduce duplicate content by removing any unnecessary parameters in url's, when using seo url's don't change your product/category names all the time and ofcourse, add a lot of random content to your pages so that basically NO page content is exactly the same, ever.
  22. not exactly. the unique identifier that the rewrite uses to determine the "real" page is in the -c-xxx.html part. hardware-C-21.html would result in index.php?cPath=21 hardware-C-22.html would result in index.php?cPath=22 The part before the -c is totally irrelevant for the rewrite to determine the actual page. hardware-C-22.html would result in index.php?cPath=22 software-C-22.html would result in index.php?cPath=22 mumbojumbo-C-22.html would result in index.php?cPath=22 all the same page. So the question is, why do you keep changing your category names.
  23. my account>profile>selling preferences>shipping Calculations> Click here to allow transaction-based shipping values to override the profile shipping settings listed above (if profile settings are enabled).
  24. yes as your rewrites are server based in your htaccess files and separate from your php controls
×
×
  • Create New...