.htacess rewrite condition: page to seconddomain/page

RewriteCond %{HTTP_HOST} ^seconddomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.seconddomain.com$ RewriteRule ^(.*)$ index.php?page_id=78 [NC,QSA] The “problem” with this is that it rewrites seconddomain.com/<everything> to /index.php?page_id=78. If you only want the second domain’s home page to be served with page_id=78 then you should change the RewriteRule pattern to match just the home page (ie. an empty URL-path). For example: … Read more

How To Fix A Redirect Chain

The non-www to www redirect is most certainly being handled (later) by WordPress. Your existing redirect in .htaccess is HTTP to HTTPS only, on the same host – which is actually the preferred (read: necessary) way if you have any plans to implement HSTS in the near future. So, this is not necessarily an “error”. … Read more

Only Allow Front End Access

You want users to Sign Up before they can see any page on your website? If that’s what you need then I think this is something I can do using jQuery. Try adding this code to your footer.php in the very end before the tags. <script> jQuery(document).ready(function($){ if (!$(“body”).hasClass(“logged-in”)) { window.location.replace(“/register”); } }); </script> Now, … Read more