Howdy all,
I've given this forum a challenge or two in the past and today I'm going to step it up a notch or three with my latest dilemma. Here are the details...
RewriteCond %{HTTP_HOST} !^((www\.)?one\.co\.za\.?(:[0-9]+)?)?$
RewriteCond %{HTTP_HOST} !^((www\.)?two\.za\.net\.?(:[0-9]+)?)?$
RewriteCond %{HTTP_HOST} !^((www\.)?three\.za\.org\.?(:[0-9]+)?)?$
RewriteCond %{HTTP_HOST} !^((www\.)?four\.za\.org\.?(:[0-9]+)?)?$
# Exclude folders
RewriteCond %{REQUEST_URI} !^/(_email)/
# Exclude phpinfo.php, sitemap.xml and robots.txt
RewriteCond $1 !^(phpinfo\.php|sitemap\.xml|robots\.txt)$
# Externally redirect all other requests to "sub.example.com"
RewriteRule ^(.*)$ http://sub.example.com/$1 [R=301,L]
Here's what's going on with that horror...
'one' is an addon domain. It's actively in use.
'two' is an PARKED domain. It's not in use and is simply going to a placeholder page located in the root.
'three' is an addon domain. It's actively in use.
'four' is a PARKED domain. It's about to be used...
There are redirect exclusions for certain files and for a certain folder: 'email'.
Everything else is then redirected to 'sub.example.com'.
The problem now is that I want to redirect 'four' to a location on an existing 'site and keep its URL intact.
ie: 'four.za.org' reflects 'four.za.org' in the address bar and loads 'blah.example.com/lorem/ipsum/' as the content. At the moment it is redirecting to 'sub.example.com' and nothing I try has fixed this as yet.
What am I missing and where is it missing? I've tried adding code before, in and after the above bundle. It either redirects to 'sub' or to the general placeholder page that 'two' shows.
Any suggestions would be most welcome and appreciated.
Thanks, Nic