Jump to content
Latest News: (loading..)

parksey

Members
  • Content count

    40
  • Joined

  • Last visited

Posts posted by parksey


  1. Thanks for that, I had been looking at this for days.

     

    I was not aware of any problems with REQUEST_URI on IIS 6 I know there is a bug in IIS 7 that causes problems with REQUEST_URI

     

    However saying that $_SERVER['REQUEST_URI'] is always a pain on windows servers

     

    here is a workaround if using the helicon rewrite

     

    <?php
       /*
       * REQUEST_URI for IIS Servers
       * Version: 1.1
       * Guaranteed to provide Apache-compliant $_SERVER['REQUEST_URI'] variables
       * Please see full documentation at 
    
       * Copyright NeoSmart Technologies 2006-2008
       * Code is released under the LGPL and maybe used for all private and public code
    
       * Instructions: http://neosmart.net/blog/2006/100-apache-compliant-request_uri-for-iis-and-windows/
       * Support: http://neosmart.net/forums/forumdisplay.php?f=17
       * Product URI: http://neosmart.net/dl.php?id=7
       */
    
       //This file should be located in the same directory as php.exe or php5isapi.dll
    
       //ISAPI_Rewrite 3.x
       if (isset($_SERVER['HTTP_X_REWRITE_URL'])){
           $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
       }
       //ISAPI_Rewrite 2.x w/ HTTPD.INI configuration
       else if (isset($_SERVER['HTTP_REQUEST_URI'])){
           $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_REQUEST_URI'];
           //Good to go!
       }
       //ISAPI_Rewrite isn't installed or not configured
       else{
           //Someone didn't follow the instructions!
           if(isset($_SERVER['SCRIPT_NAME']))
               $_SERVER['HTTP_REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
           else
               $_SERVER['HTTP_REQUEST_URI'] = $_SERVER['PHP_SELF'];
           if($_SERVER['QUERY_STRING']){
               $_SERVER['HTTP_REQUEST_URI'] .=  '?' . $_SERVER['QUERY_STRING'];
           }
           //WARNING: This is a workaround!
           //For guaranteed compatibility, HTTP_REQUEST_URI or HTTP_X_REWRITE_URL *MUST* be defined!
           //See product documentation for instructions!
           $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_REQUEST_URI'];
       }
    
    ?>
    

     

    Not mine but free and you could add it to the includes if anybody else has this problem.

     

    I added it to PHP.ini and went back to the original code.

     

    Thanks for all the help, I was pulling my hair out.


  2. Hi giuys im new to the forum and hoping to get i little help, i have just installed this mod and am having the PNF issue, can anybody let me know a way to fix this.

     

    www.outdoor-ideas.co.uk

     

    Many thanks.

     

    Ivan.

     

    Switch on debugging and post the URL's on here. DO you have a test site we can look at with this issue.

    Are you getting any errors in your php error log?

     

     

    Be sure you have placed the rewrite rules in the .htaaccess file ??

    And what server is it running on? Apache IIS ?


  3. This suggests that your includes/configure.php is incorrect.

     

    You mentioned an error where includes/configure.php cannot be found, you may also want to try the includes/local/ directory to see if there's a configure file in there.

     

    As for your redirect, you mentioned the 301 as ..

     

    http://www.devsite.com/floor-scales-c-27.html 

     

    But was was the intended link location?

     

    Yes the URL is correct, if I switch the WWW.DEVSITE.COM for the domain with version 2 running I get the correct page.

    The includes /local does not have configure.php in it and the site runs fine, the link to the test site is www.dev.brash-scales.com if you would like to take a look ?

     

    It throws no errors in PHP and having KISS installed does not get me any closer, great contrib mind as it shows up some contribs to be really buggy.

     

    Again help is greatly appreciated.


  4. Never used that add-on so here is the output seems ok to me

     

    HTTP/1.1 301 Moved Permanently

    Connection: close

    Date: Thu, 11 Feb 2010 20:28:59 GMT

    Server: Microsoft-IIS/6.0

    X-Powered-By: ASP.NET, PHP/5.2.5

    Set-Cookie: cookie_test=please_accept_for_session; expires=Sat, 13-Mar-2010 20:28:59 GMT; path=/; domain=DEVSITE.com

    Expires: Thu, 19 Nov 1981 08:52:00 GMT

    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

    Pragma: no-cache

    Location: http://www.DEVSITE.com/floor-scales-c-27.html

    Content-Encoding: gzip

    Vary: Accept-Encoding

    Content-Type: text/html

     

    Saying that I would have thought that I should not be getting a 301 redirect for a generated url? surly this should be 200.

     

    Any thoughts?


  5. Has anybody tested the rewrite function with IIS running Helicon ISAPI_rewrite?

     

    I have Version 2.1 running on IIS in rewrite with this mod which works really well. Having loaded version 5 on my dev site everything seems fine, all the urls seem to be written correctly but it gets stuck in an endless loop. the only error reported in the PHP error log is:

    PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/configure.php' (include_path='.;C:\php5\pear') in D:\Inetpub\wwwroot\TestSite\includes\application_top.php on line 32

     

    The path to pear is infact d:\php\pear but I could not trace what was causing this error. I assume that it was in their somwhere but got fed up of looking.

    I'm going to switch our dev site over into a root directory tonight and try it again.

     

    Also if you need to test on IIS let me know I should be able to assist we have a few IIS servers online and should be able to find space somewhere.

     

    Cheers

     

    Rhys


  6. Hey all any chance of some help with this.

     

    I have Ultimate SEO installed on our store and most bots seem to follow this strange link https://www.mystore.com/index.php?cPath=22_46_47_21_28_31_33_38_40_30&

    which should be http://www.MYSTORE.com/pallet-truck-scales-c-30.html

     

    Any ideas how to redirect the old cPath urls with a 301 and restrict robots from following https?

     

    Your assistance would be greatly appreciated.

     

     

    Many thanks


  7. Please Help

     

     

    I have installed the latest version and need some assistance.

     

    I am running it on IIS6 with Mod ReWrite which seems to work ok as

     

    if i go to http://www.shop.calibraweighing.co.uk/coun...cales-c-24.html it gets to the correct page

    But as soon as I enable the SEO Urls i get a error web page that says Redirection limit for this URL exceeded.

     

    I am completly stuck, it's not throwing any PHP errors or ReWrite errors that I can see

     

    Can anybody point me in the right direction?


  8. Any body actually got this working with GoogleCheckout?

     

    I can get the shipping methods up but the price always seems to default to whatever I have set in the GoogleCheckout admin, when I check the integration issues on GC I can see a HTTP 500 error for responsehandler.php but everything else works correctly, i.e the orders are being transferred to the OSC admin?

     

    Any ideas?

     

    We are using PHP5 with IIS6 so .htaccess does not work with IIS, I think this may be part of the problem?


  9. Maybe somthing like this, my php is a bit rusty so don't laugh !!

    <?php 
    if (eregi ('oscsid', $_SERVER['REQUEST_URI'])) {
     $user_agent = $_SERVER['HTTP_USER_AGENT'];
     $bots= array("msnbot", "nbot");
      if (eregi ($bots, $user_agent)){
     header('Status: 301 Moved Permanently'); 
     header('Location: http://www.example.com/newurl.html'); 
     exit(); 
     }
     }
    ?>

     

    or maybe add an & to the spiders.txt then

    <?PHP
    
    if (eregi ('oscsid', $_SERVER['REQUEST_URI'])) {
    $filename = "spiders.txt";
    $handle = fopen($filename, "r");
    $contents = fread($handle, filesize($filename));
    fclose($handle);
    $spiders_array = explode("&",$contents);
    $user_agent = $_SERVER['HTTP_USER_AGENT'];
    
      if (eregi ($spiders_array, $user_agent)){
     header('Status: 301 Moved Permanently'); 
     header('Location: http://www.example.com/newurl.html'); 
     exit(); 
     }
     }


  10. It gets turned into an array when processed in application_top.php. But what you're implying is that the array will get searched for every connection. As it is now, it gets searched only if there is no sid in the URL (or cookie), and then the only effect is to not start a new session.

    Maybe somthing like this, my php is a bit rusty so don't laugh !!

    <?php 
    if (eregi ('oscsid', $_SERVER['REQUEST_URI'])) {
     $user_agent = $_SERVER['HTTP_USER_AGENT'];
     $bots= array("msnbot", "nbot");
      if (eregi ($bots, $user_agent)){
     header('Status: 301 Moved Permanently'); 
     header('Location: http://www.example.com/newurl.html'); 
     exit(); 
     }
     }
    ?>


  11. Hmm. Well, you can do the equivalent in PHP by searching the user agent string for msnbot and if you find it and $session_started is true, use the "header" command to do a 301 redirect to the same URL minus the sid.

    Hummm what an idea, but even better if we spent some time turning spidrs.txt into an array, then do it, this would speed up the processing time somewhat do you think?


  12. That is what I thought at first, but I have never seen msnbot without a session ID.

     

    Is their a way I can force a 301 redirect if the page is hit by a bot listed in spiders.txt, which should over time remove any session Id's from the index?

     

    You help by the way if greatly appreciated !

     

     

    url is http:// shop . calibraweighing . co.uk


  13. Are you sure that msnbot hasn't held onto an old osCsid and is using that to access your site? If the first access has the ID, that is likely.

     

    That SiteChecker is probably not spidering your site - it is just looking to see if the site is up. You should not see any access other than index.php.

     

     

    That is what I thought at first, but I have never seen msnbot without a session ID.

     

    Is their a way I can force a 301 redirect if the page is hit by a bot listed in spiders.txt, which should over time remove any session Id's from the index?

     

    You help by the way if greatly appreciated !


  14. I do not trust the display you are showing here. Post the entry from your web access log showing the GET of the page from msnbot.

     

     

    GET /index.php cPath=42 80 - 65.55.210.37 msnbot/1.1+(+http://search.msn.com/msnbot.htm) 200 0 0 5654 298

    GET /shopping_cart.php osCsid=1red00mdgjglncmjijk8rg5ig0 80 - 65.55.210.35 msnbot/1.1+(+http://search.msn.com/msnbot.htm) 200 0 0 4751 331

     

    It keeps getting a session ID and being identified in WHo's Online as a customer not a BOT

    I also have this one, not sure why it is spidering my site but :

     

    GET /index.php - 80 - 208.122.4.142 FreeWebMonitoring+SiteChecker/0.1+(+http://www.freewebmonitoring.com) 200 0 64 343 238


  15. Hi All I am having problems with livebot still getting session id's Googlebot does not but Livebot and msnbot is starting to annoy me.

     

    livebot-65-55-210-42.search.live.com 22:55:16 22:55:16 /cookie_usage.php Yes Not Found

    Name: Guest

     

    ID: 0

     

    IP Address: 65.55.210.42

     

    User Agent: msnbot/1.1 (+http://search.msn.com/msnbot.htm)

     

    I do have nbot in my spiders.txt but it does not seem to work and clues would be appreciated.


  16. Hi All,

     

    not sure if this is the right place but please could somone help me with the new attributes manager v5

     

    I have followed the install and all seems to go ok but when I click on the link for New Attribute manager i get

    a page that shows:

     

    "; require('new_attributes_config.php'); require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEW_ATTRIBUTE_MANAGER); if ( $cPathID && $action == "change" ) { require('new_attributes_change.php'); tep_redirect( './' . FILENAME_CATEGORIES . '?cPath=' . $cPathID . '&pID=' . $current_product_id ); } ?>

     

    I would be greatful for some assistance

×