Forum Moderators: phranque
## Domain exclusions ("(www.)example.co.za" and blank)
# Parked bbb.za.org Redirect exclusion
RewriteCond %{HTTP_HOST} ^(www\.)?bbb\.za\.org
RewriteRule (.*) http://blog.aaa.com/sub1/sub2/$1 [R=301,L]
# Other Addon/Parked exclusions
RewriteCond %{HTTP_HOST} !^((www\.)?ccc\.co\.za\.?(:[0-9]+)?)?$
RewriteCond %{HTTP_HOST} !^((www\.)?ddd\.za\.net\.?(:[0-9]+)?)?$
RewriteCond %{HTTP_HOST} !^((www\.)?eee\.za\.org\.?(:[0-9]+)?)?$
# Directory exclusions
RewriteCond %{REQUEST_URI} !^/(_attachments)/
# File exclusions
RewriteCond $1 !^(page\.php|sitemap\.xml|sitemap\.xml\.gz|robots\.txt|google##########\.html)$
# All other requests to...
RewriteRule ^(.*)$ http://blog.aaa.com/$1 [R=301,L]
# Sitemap redirection
Redirect 301 /sitemap.xml [url]http://blog.aaa.com/sitemap.xml[/url]
# Redirect if subfolder index is requested (Signature/s, etc.)
RewriteRule ^_attachments/?$ [url]http://blog.aaa.com/[/url] [R=301,L]
# Redirect if non-existent file in subfolder is requested
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^_attachments/(.+)$ http://blog.aaa.com/$1 [R=301,L] I do apologise for the lack 'example.com' here, but I am working with multiple domains and wasn't sure how to go about it.
RewriteRule foobar\.html blahblah
RewriteRule other stuff here RewriteCond %{REQUEST_URI} !foobar\.html
RewriteRule blahblah
RewriteRule foobar\.html blahblah
# File exclusions
RewriteCond $1 !^(page\.php|sitemap\.xml(\.gz)?|robots\.txt|google1234567890\.html)$
# Directory exclusions
RewriteCond %{REQUEST_URI} !^/(_attachments)/
## Domain exclusions ("(www.)example.co.za" and blank)
RewriteCond %{HTTP_HOST} !^((www\.)?ccc\.co\.za\.?(:[0-9]+)?)?$
RewriteCond %{HTTP_HOST} !^((www\.)?ddd\.za(\.net|\.org)?(:[0-9]+)?)?$
# Parked bbb.za.org exclusion
RewriteCond %{HTTP_HOST} ^(www\.)?bbb\.za\.org
RewriteRule (.*) http://blog.aaa.com/sub1/sub2/$1 [R=301,L]
# Sitemap redirection
RewriteRule ^sitemap.xml(\.gz)?$ blog/sitemap.xml(\.gz)?
# All other requests to...
RewriteRule ^(.*)$ http://blog.aaa.com/$1 [R=301,L]
# Redirect if subfolder index is requested
RewriteRule ^_attachments/?$ [url]http://blog.aaa.com/[/url] [R=301,L]
# Redirect if non-existent file in subfolder is requested
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^_attachments/(.+)$ http://blog.aaa.com/$1 [R=301,L] What do you mean by mixing code from different modules?