Not signed in ( Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorandyhot
    • CommentTimeNov 20th 2009
     permalink
    Upon uploading all files to a windows server, all urls were of the form:
    http://mysite.com\\/index.php (notice the extra \\ before / )!

    Anyway, i've fixed that by modifying ./defaults.php :

    107c107
    < define('BLOG_ROOT', ('/'==($v=dirname($_SERVER['SCRIPT_NAME']))? $v : $v.'/') );
    ---
    > define('BLOG_ROOT', ('/'==($v=str_replace(dirname($_SERVER['SCRIPT_NAME']), '\\', '/'))? $v : $v.'/') );

    Perhaps that'll help ppl.
    •  
      CommentAuthorandyhot
    • CommentTimeNov 20th 2009
     permalink
    preview messed up the example url i gave... it's supposed to be http://mysite.com\/index.php (extra \ before /)
    •  
      CommentAuthorNoWhereMan
    • CommentTimeNov 20th 2009
     permalink
    I suggest to just change it to:
    define('BLOG_ROOT', 'http://mysite.com/' );
    •  
      CommentAuthorandyhot
    • CommentTimeNov 20th 2009
     permalink
    Yea, thx, that's also possible.

    On the other hand, I usually also run the same exact sites locally, so it's handy not having
    to make changes when uploading (i.e. same files can work fine locally and live)
    •  
      CommentAuthorNoWhereMan
    • CommentTimeNov 20th 2009
     permalink
    see if this works:

    define('BLOG_ROOT', (DIRECTORY_SEPARATOR==($v=dirname($_SERVER['SCRIPT_NAME']))? $v : $v.'/') );
    •  
      CommentAuthorandyhot
    • CommentTimeNov 20th 2009
     permalink
    thx - your suggestion is almost correct! Here's what seems to universally work:


    define('BLOG_ROOT', (DIRECTORY_SEPARATOR==($v=dirname($_SERVER['SCRIPT_NAME']))? '/' : $v.'/') );


    For the record, my original suggestion that proposed str_replace is in fact wrong cause i mixed up the order of the argument :P
  1.  permalink
    thank you for your solution. I had the same problem, as I run my site locally then upload it, I did not want to change it upon uploading. thanks again