Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter wocai

    (@wocai)

    stripos on line 842 did not help, but like I said, it is a very minor issue or no issue at all – I think it’s OK that the header links to the default home page, not the language-specific one. So it is not worth overloading a bunch of stuff in a child theme.

    It all works as intended on our Apache test site, too, so it is very likely related to the original IIS / Index.php problem.

    Thread Starter wocai

    (@wocai)

    Yes, that helped, almost everything is behaving consistently now, the only minor issue remaining from earlier is that the header in the English version links to the default language / instead of /en , but we can live with that, with the Home link in the Eng menu pointing to the English home page anyway.

    I think we’ll have to talk to the hosting people about the root cause of this Index.php confusion, but with this fix the site is usable. Thank you for your time and happy holidays!

    Thread Starter wocai

    (@wocai)

    Using
    if (is_home() && false === strpos($_SERVER['SCRIPT_NAME'], 'Index.php')) {
    fixed the default home page, but broke things on the /en home page – widgets were showing content from both languages and the header linked to /, not /en, so it switched the language back to default.

    I added PHP_SELF and it also shows up as /Index.php

    As far as I can tell from two different FTP clients, both index.php in the root directory and the one in the wordpress directory have names starting with a lowercase ‘i’. The rewrite rule also has a lowercase ‘i’:

    <rule name="wordpress" patternSyntax="Wildcard">
    	<match url="*"/>
    		<conditions>
    			<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
    			<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
    		</conditions>
    	<action type="Rewrite" url="index.php"/>
    </rule>
    Thread Starter wocai

    (@wocai)

    I added the new script and it seems that SCRIPT_NAME does show up as /Index.php with a capital “I”. Not sure why that is or what to do about it.

    Thread Starter wocai

    (@wocai)

    Thank you for the quick response. I added the following:

    echo '<!-- dbginfo:';
    print_r($query->query);
    echo 'is_home():';
    print_r(is_home());
    echo '-->';

    However, it seems that this code is not called on the default language home page at all, although it is called for all other posts and pages.

Viewing 5 replies - 1 through 5 (of 5 total)