Install subdomain or subfolder site

Home Forums BulletProof Security Free Install subdomain or subfolder site

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7362
    Julie Eudy
    Participant

    Hey All,

    I have a client site that a colleague of mine – at the time – installed BPS onto.  According to logs, all worked fine until we added a subdomain on their hosting account with Godaddy.  They recorded that they (with Godaddy support) disabled BPS and ended up deleting the original htaccess file created as it caused problems with trying to establish the subdomain hosting account and install of the 2nd wordpress on their account.   Unaware at the time,  I believe this could be the source of the reason we can’t access any of the widgets to make changes.

    Needless to say, this “colleague” is no longer around and I’m trying to fix this mess.  Any suggestions on how to uninstall or fix without taking the other subdomain?

    It’s currently deactive and all functionality on the site works except the widgets for the sidebars, etc.  I’m lost…. If I reactivate to follow unistall instructions, I could jeopardize the other install unless you have other ideas????

    HELP!

    Julie

    #7369
    AITpro Admin
    Keymaster

    The original WordPress website must have been installed in the hosting root/Document Root folder and a root .htaccess file was in the hosting root/Document Root folder which would recursively apply security filters to all subfolders off of/below the hosting root/Document Root folder.

    .htaccess files are recursive/heirarchical.

    Example:
    .htaccess file in the Document Root folder…
    /.htaccess

    …will apply its security rules to all subdomain/subdirectory folders…

    /subfolderA
    /subfolderB
    /subfolderB/subfolderC

    …unless an .htaccess file exists in a particular subfolder then it will follow the security rules in its own .htaccess file.

    In this particular case instead of deleting the existing Document root .htaccess file and maybe the wp-admin .htaccess file as well.  The simple solution would have been to create RewriteRules to not apply security to them by doing what is shown below in the root .htaccess file.  Adding RewriteRules directly after/below the WP REWRITE LOOP START .htaccess code in the root .htaccess file.

    WP REWRITE LOOP START
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    ...add your RewriteRules here...
    
    # RewriteRule for Custom Apps outside of WP or subfolder/subdomain sites
    RewriteRule ^/subfolderA/ - [L]
    RewriteRule ^/subfolderB/ - [L]

    So at this point if the subdomain website has BPS installed and setup or it already has its own .htaccess file that was manually created then all you would need to do is the normal BPS setup steps on the original website installed in the hosting root/Document Root folder.  If the subdomain site does NOT have BPS installed or is not using its own .htaccess file then you would need to create the RewriteRules shown above in the example in the root .htaccess file for the  website installed in the hosting root/Document Root folder.

    Or there is another option:  Create a RewriteEngine Off .htaccess file and upload it to the subdomain site’s folder.  See the Forum Topic link below.

    http://forum.ait-pro.com/forums/topic/rewriteengine-off-htaccess-file/

    NOTE:  You could also do this beforehand and put a RewriteEngine Off .htaccess file in an empty subdomain folder before doing a WordPress installation in that subdomain’s folder.

    #12195
    AITpro Admin
    Keymaster

    To save your custom RewriteRules for custom apps, subfolder/subdomain sites permanently add them to BPS Custom Code.

    1. Copy this .htaccess code below to this Custom Code text box:  CUSTOM CODE WP REWRITE LOOP START: Add www to non-www/non-www to www code here
    2. Click the Save Root Custom Code button.
    3. Go to the BPS Security Modes page and click the Root Folder BulletProof Mode Activate button.

    # WP REWRITE LOOP START
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    ...add your custom RewriteRules here...
    
    # RewriteRule for Custom Apps outside of WP or subfolder/subdomain sites
    # Add your actual custom app, subdomain/subfolder names in place of these example subfolder names
    RewriteRule ^/subfolderA/ - [L]
    RewriteRule ^/subfolderB/ - [L]
    #14165
    dev
    Participant

    BPS is a great plugin to create .htaccess file. but i have another folder in public_html lets say “blog”. When i try to open blog.example.com then it says 500 internal error. How do i modify the .htaccess so that *.example.com will all work applying all security measures.

    Thank you in advance!

    #14167
    AITpro Admin
    Keymaster

    @ dev – your topic has been merged into this relevant topic.  Please see the options above in this forum topic for a solution.  Also if the other site installed in the “blog” folder is a WordPress site then you would install BPS on that subdomain site.  Since you are seeing a 500 error for that site you would delete your root .htaccess file in the example.com website root folder and then either use the methods above or install BPS on the “blog” site if it is a WordPress website.  Then you can login to your example.com WordPress site and activate root folder BulletProof Mode again on that site.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.