Forum Moderators: phranque
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^mysite.com$
RewriteRule ^/?$ "http\:\/\/mysite\.com\/site1\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^index.htm$ "http\:\/\/mysite\.com\/oldstuff\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^page2/?$ "http\:\/\/mysite\.com\/oldstuff\/page2\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^page3/index.htm$ "http\:\/\/mysite\.com\/oldstuff\/page3\/" [R=301,L] RewriteEngine on
RewriteOptions Inherit
...standard WP htaccess code... RewriteCond %{HTTP_HOST} ^www.mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^mysite.com$
RewriteCond %{HTTP_HOST} example\.org
since you didn't say anything about subdomains that have to be excluded. Even if they existed, it would be a single line, with opening anchor only: When RewriteOptions Inherit is not turned on in the site2's htaccess I can still inherit using SetEnvIf and Deny from, and this works.
I did not know that you need not escape anything in the target!
RewriteCond %{HTTP_HOST} ^www.mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^mysite.com$
Why, when you can achieve the same result with (using "example.org" as the name)since you didn't say anything about subdomains that have to be excluded. Even if they existed, it would be a single line, with opening anchor only:RewriteCond %{HTTP_HOST} example\.org
^(www\.)?example\.org
public_html/site3/ has a different hostname than mysite.com...
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$
I did not know that you need not escape anything in the target!
Pattern is a perl compatible regular expression.
The Substitution of a rewrite rule is the string that replaces the original URL-path that was matched by Pattern.
i refer to the documentation early and often.
V 2.2.32 is dated 2017-01-13.