Viewing 15 replies - 16 through 30 (of 30 total)
  • Thread Starter leejosepho

    (@leejosepho)

    A Server will automatically look for an index file by default and load it if it exists. Either index.php, index.html or index.htm.

    So then, I could just do this?

    ## block this next line for Maintenance Mode
    #RewriteRule ^(/)?$ primarydomain/index.php [L]

    Edit: Ah, no, because then the server would not know where to send the URL for the primarydomain folder.

    Plugin Author AITpro

    (@aitpro)

    Are you using this .htaccess directive?

    By default a Server will try to load either an index.php, index.html or index.htm file. This code below tells the Server to load the index.php file and not an index.html file. This would allow you to keep an index.html file in a folder and it would NOT load.

    # DIRECTORY INDEX FORCE INDEX.PHP
    # Use index.php as default directory index file
    # index.html will be ignored will not load.
    DirectoryIndex index.php index.html /index.php

    To make the index.html file load instead of the index.php file you would change the code to this:

    # DIRECTORY INDEX FORCE INDEX.HTML
    # Use index.php as default directory index file
    # index.html will be ignored will not load.
    DirectoryIndex index.php index.html /index.html
    Plugin Author AITpro

    (@aitpro)

    Edit: Ah, no, because then the server would not know where to send the URL for the primarydomain folder.

    Of course it would not know what to do unless you tell it what to do with additional .htaccess code. By Default a Server will load either an index.php, index.html or index.htm file. If you want the Server to load a different file then you have to tell it what you want it to load instead. You would do that with additional .htaccess code.

    Thread Starter leejosepho

    (@leejosepho)

    Are you using this .htaccess directive?

    # DIRECTORY INDEX FORCE INDEX.PHP
    # Use index.php as default directory index file
    # index.html will be ignored will not load.
    DirectoryIndex index.php index.html /index.php

    Those lines are where BPS puts them, but BPS does not know my public_html/.htaccess even exists. I could add those lines there, of course, but that would only affect the primary domain and not the add-ons.

    Plugin Author AITpro

    (@aitpro)

    You are asking for a custom coding solution and I am givinng you some options you can create yourself for your custom solution. You are not doing something standard so BPS is not going to magically read your mind or magically do something that is not designed to do. 😉

    You would need to create .htaccess files for each add-on domain and NOT try and handle this from the primary domain. This is standard/basic site architecture and the best approach anyway – each website should have its own .htaccess file for all the right/correct industry/security standards, site architecture, site design, etc etc etc.

    Thread Starter leejosepho

    (@leejosepho)

    Yes, understood, and BPS works perfectly for each site. I am just trying to figure this out:

    To put Server Account B primary.domain in Maintenance Mode in the way I am presently doing so, I have to copy index.html into the primarydomain folder since I cannot just leave it there all the time like I can at Server Account A.

    The only thing that is different between public_html/.htaccess at Server Account A and Server Account B is that Server Account B’s public_html/.htaccess file does *not* include this line:

    AddHandler application/x-httpd-php53s .php

    Is that why I cannot leave the “Maintenance Mode” index.html file in Server Account B’s primarydomain folder all the time like I can at Server Account A?

    Note: As far as I know, that AddHandler line applies to the entire account (all three domain) even though the following lines only point the primary URL.

    Plugin Author AITpro

    (@aitpro)

    an html file does not have anything to do with a php handler so the answer is no the php handler will not make any difference.

    By Default a Server will load either an index.php, index.html or index.htm file. If you do not want the Server to load the index.html file then tell it not to load the index.html file in the new .htaccess file in the folder for that website that YOU create for the website that you are calling Server Account B:

    # DIRECTORY INDEX FORCE INDEX.PHP
    # Use index.php as default directory index file
    # index.html will be ignored will not load.
    DirectoryIndex index.php index.html /index.php

    At this point I cannot explain these basic website principles any simpler.

    Thread Starter leejosepho

    (@leejosepho)

    an html file does not have anything to do with a php handler

    I understand that, but the presence of the AddHandler line at one account and not the other does seem to affect how the primary domain at each account acts when an index.html file resides inside the primary domain’s folder. At one account, it is ignored…and at the other, it is not.

    All of that likely has to do with however BlueHost handles things, and I surely do understand BPS should not be expected to deal with that.

    Plugin Author AITpro

    (@aitpro)

    You have made an incorrect assumption. A php handler tells the Server these types of things: load this php version on my website, load this php.ini file, other things specifically related to php ONLY. A php handler does not and cannot affect an html file.

    Thread Starter leejosepho

    (@leejosepho)

    A php handler does not and cannot affect an html file.

    Understood, but one Server Account gets its PHP version info from someplace other than public_html/.htaccess, and so maybe DirectoryOrder is also different at that out-of-sight BlueHost file at Server Account B.

    Many thanks for the great insight here!

    Thread Starter leejosepho

    (@leejosepho)

    Update: This is embarrassing to have to admit, but I had not noticed this in the htaccess file for Server Account B:
    RewriteRule ^(/)?$ primarydomain/index.html [L]

    I had just assumed that line said .php like at the other account. ::Big Blush::

    Thanks again since you always do everything you possibly can to be helpful, and even the BlueHost Support Tech that just helped me discover my oversight is impressed with your fine work!

    Thread Starter leejosepho

    (@leejosepho)

    You are asking for a custom coding solution and I am givinng you some options you can create yourself for your custom solution. You are not doing something standard so BPS is not going to magically read your mind or magically do something that is not designed to do. 😉

    Everything is all straight now, and I can even do things the way BPS suggests. As I had mentioned before, I still have this in my root folder (public_html) on the server:

    ### select Normal Mode -or- Maintenance Mode
    ## this next line is for Normal Mode
    RewriteRule ^(/)?$ primarydomain/index.php [L]
    ## this next line can be used for Maintenance Mode
    #RewriteRule ^(/)?$ primarydomain/index.html [L]

    But now I also have this via BPS at each site:

    # DIRECTORY INDEX FORCE INDEX.PHP
    ### SELECT INDEX.PHP -or- INDEX.HTML
    ## Use index.php as default directory index file
    DirectoryIndex index.php index.html /index.php
    ## Use index.html for Maintenance Mode
    #DirectoryIndex index.html index.php /index.html

    So, no more renaming index.php for “Maintenance Mode”, and maybe the new method you have coming up will be even better.

    If you use another naming convention other than index.xxx then you can create .htaccess code to turn this file on or off without the Server automatically loading the file.

    Example: maintenance.php or maintenance.html

    Would that be by changing these lines, or do you have something else in mind?

    ## Use index.html for Maintenance Mode
    #DirectoryIndex index.html index.php /index.html

    But the thing I am actually looking for at the moment is to redirect http://www.nnysandbox.net/index or http://www.nnysandbox.net/(nosuchfile) to http://www.nnysandbox.net/index.html (or to maintenance.html).

    Plugin Author AITpro

    (@aitpro)

    For simple straight forward redirects you can use RedirectMatch

    RedirectMatch 301 ^/some-file-name.html$ http://www.example.com/another-file-name.html

    Plugin Author AITpro

    (@aitpro)

    The original question was already resolved. Resolving this thread again. Please do not change this to unresolved again since you are asking different questions. Just leave it in resolved status. We still get email notifications if the thread is in resolved status. Thanks.

    Thread Starter leejosepho

    (@leejosepho)

    The original question was already resolved… Just leave it in resolved status. We still get email notifications if the thread is in resolved status. Thanks.

    Sure enough, and I thank you!

Viewing 15 replies - 16 through 30 (of 30 total)

The topic ‘Broken Link Checker plugin HEAD Request Method filter problem detected’ is closed to new replies.