We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34
    • 2 Posts
    Actually, I have exactly the same problem as described in http://modxcms.com/forums/index.php/topic,2035.0.html. But that topic is 1 year old and the solution provided there didn’t help me so far.

    Quote from: lostworld at Jan 03, 2006, 03:38 PM

    I’ve just installed MODx 0.9.1 and am having a problem with the domain being identified by as the base_url (or is that base_path?)

    My domain (let’s say www.<vanity-domain>.com) is actually hosted at www.<real-domain>.com/subdir with a URL masking feature to make the whole deception look invisible. When I type in www.<vanity-domain>.com, MODx detects the ’real’ server root on <real-domain>.com and tries to find its assets at www.<vanity-domain>.com/subdir/assets instead of www.<real-domain>.com/subdir/assets.

    The obvious solution seems to be:
    Quote from: xwisdom at Jan 04, 2006, 11:42 AM

    All you have to do is add the following to the bottom of your config.inc.php file

    $base_url='<your /url to your site>';
    $base_path='<your /physical_path to your site>';
    $site_url='<your www.vanity-domain.com>';
    Well, I tried this, but it doesn’t work.

    I wondered why and placed an "echo ’$base_url’" and the end of index.php and *that* $base_url was correct. So I changed config.inc.php into: "$base_url=’bogus’;". It echoes ’bogus’, but the final [(base_url)] is still ’/domain2/’.

    My configuration:
    Actual host: www.domain1.com
    Virtual domain: www.domain2.com
    Base-path: D:/www/domain1.com/domain2/
    IIS 5.0, PHP 5.

    Using ISAPI-Rewrite for proper direction and friendly url’s. Works great.

    #Fix missing slash char on folders
    RewriteCond  Host:  (.*)
    RewriteRule  ([^.?]+[^.?/]) http\://$1$2/ [I,R]
    
    RewriteCond Host: .*domain2\.nl
    RewriteRule /(.*).html /domain2/index.php?q=$1 [I,L]
    
    RewriteCond Host: .*domain2\.nl
    RewriteRule (.*) /domain2$1 [I,L]


    Currently I hacked document.parser.class.inc.php: ’$out= str_replace("/subdir/", "/", $out)’. This does work, but is not as it should be smiley.
      • 34
      • 2 Posts
      Anyone? Is it normal that config.inc.php is ignored?