1

The hosting company I'm with has completely destroyed my .htaccess file about a month ago and while I managed to make most of it work again, I do not know how to add two exceptions to WordPress' wildcard subdomains (I use WordPress multisite). The hosting company is refusing to help me and, as a plain old web designer, I am not that good with rewrite rules and the server stuff and I never was.

This is the file - where do I add exceptions for approved.iva-is.me and love.iva-is.me?

<Files .htaccess>
order allow,deny
deny from all
</Files>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

1 Answer 1

0

Insert this rule just below RewriteBase / line:

# skip these 2 hosts
RewriteCond %{HTTP_HOST} ^(approved|love)\.iva-is\.me$ [NC]
RewriteRule ^ - [L]
8
  • Sadly, nothing is happening. I added them where you suggested it and I still get redirected to the main domain.
    – Iva
    Mar 5, 2014 at 18:03
  • 1. Try this in a new browser. 2. Open firebug and then open your page to see what you get in Net tab.
    – anubhava
    Mar 5, 2014 at 18:05
  • Thanks for offering more help. I use Chrome more than Firefox and here is what the Network tab outputs, assuming the top two lines are relevant: link
    – Iva
    Mar 5, 2014 at 19:18
  • Hmm I see a 302 happening before which shouldn't happen as per this rule. Are you sure this is placed in root .htaccess as first rule
    – anubhava
    Mar 5, 2014 at 19:55
  • Sure. The rest of the file contains only WP Total Cache rules. I just looked at the Subdomains section on my cPanel and I see no redirections of any kind.
    – Iva
    Mar 5, 2014 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.