WordPress.org

Forums

Best auto starting WP in sub folder (5 posts)

  1. mugger
    Member
    Posted 5 years ago #

    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 http://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?

  2. MichaelH
    Member
    Posted 5 years ago #

    To make WordPress available at http://mydomain.com just change in Settings->General, the Blog address (URL) to http://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.

  3. mugger
    Member
    Posted 5 years ago #

    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?

  4. MichaelH
    Member
    Posted 5 years ago #

    Can't address that so will direct you to Hardening WordPress. If you do find a security issue, email security@wordpress.org.

  5. mugger
    Member
    Posted 5 years ago #

    Thanks.
    Tried to mark "resolved".

Topic Closed

This topic has been closed to new replies.

About this Topic