WordPress.org

Ready to get started?Download WordPress

Forums

Hide Login+
[Plugin: Hide Login] Multiple sites, one htaccess (2 posts)

  1. roaima
    Member
    Posted 1 year ago #

    I have multiple sites installed on a server. Each one has its own database prefix within a single database. (This isn't multisite, as I couldn't see how to have multiple sites with independent and unrelated domains.)

    I tweaked the suggested .htaccess rules to use %{HTTP_HOST} rather than the named site, and I've activated the plugin within all the sites. Unfortunately it doesn't work any more.

    I appreciate the likelihood is that you'll say "put it back as it was", but then it will work only with the named site, and will break all the others.

    RewriteEngine On
    RewriteBase /
    
    RewriteRule ^OUT wp-login.php?action=logout&_wpnonce=1234567890&hide_out_key=999001 [L]
    RewriteRule ^IN wp-login.php?hide_in_key=Ab123456&redirect_to=http://%{HTTP_HOST}/wp-admin/ [R,L]
    RewriteRule ^ADM wp-admin/?hide_admin_key=AwwT99 [R,L]
    
    RewriteCond %{HTTP_REFERER} !^http://%{HTTP_HOST}/wp-admin
    RewriteCond %{HTTP_REFERER} !^http://%{HTTP_HOST}/wp-login\.php
    RewriteCond %{HTTP_REFERER} !^http://%{HTTP_HOST}/IN
    RewriteCond %{HTTP_REFERER} !^http://%{HTTP_HOST}/ADM
    RewriteCond %{QUERY_STRING} !^hide_in_key=Ab123456
    RewriteCond %{QUERY_STRING} !^hide_out_key=999001
    RewriteCond %{QUERY_STRING} !^hide_reg_key=1919199
    RewriteCond %{QUERY_STRING} !^hide_admin_key=AwwT99
    RewriteRule ^wp-login\.php http://%{HTTP_HOST} [L]
    
    RewriteCond %{QUERY_STRING} ^loggedout=true
    RewriteRule ^wp-login\.php http://%{HTTP_HOST} [L]
    
    #RewriteRule ^index\.php$ - [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    Do you have any better solutions, please?

    Cheers,
    Chris

    http://wordpress.org/extend/plugins/hide-login/

  2. (This isn't multisite, as I couldn't see how to have multiple sites with independent and unrelated domains.)

    Actually that's pretty easy: http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

    But really your separate domains shouldn't be installed in the same folder.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.