• mugger

    (@mugger)


    WP allows installation in root or sub folder /wpname.
    It also allows naming front and blog default pages.

    What is best way to autostart WP from https://domain.com if located in /wpname?

    If redirecting with index.php in root, hijackers can have fun.

    If with 301 redirect in .htaccess, my host support says is not reliable in Linux/apache.

    And does Google search mind such redirection?

Viewing 4 replies - 1 through 4 (of 4 total)
  • MichaelH

    (@michaelh)

    To make WordPress available at https://mydomain.com just change in Settings->General, the Blog address (URL) to https://mydomain.com and put this index.php file in your web-root folder (it is the same folder that contains the wpname folder)

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wpname/wp-blog-header.php');
    ?>

    Then update your permalinks in Settings->Permalinks.

    Thread Starter mugger

    (@mugger)

    Thanks for fast response.
    Suppose a hijacker inserts a malicious <iframe ...> at bottom of file. Does it redirect or does WP take over first?

    Or can you tell how to prevent such attacks?

    MichaelH

    (@michaelh)

    Can’t address that so will direct you to Hardening WordPress. If you do find a security issue, email [email protected].

    Thread Starter mugger

    (@mugger)

    Thanks.
    Tried to mark “resolved”.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Best auto starting WP in sub folder’ is closed to new replies.