I’m trying to solve a mod_rewrite issue but I can’t seem to wrap my head around it. I tried serval solutions from stackoverflow threads but it isn’t working.
Basically I have a WordPress Multisite installation that forwards subdomains to index.php I want to make and exception for subdomain test.simapro.com so it doesn’t get redirected to index.php but has its normal behaviour. How do I do this?
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [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]
Add a
RewriteCond
in your last rule: