Page is a not externally linkable
jdMorgan - 11:19 am on Aug 25, 2010 (gmt 0)
This calls for an external redirect, not a rewrite. Specifically, it calls for a 301-Moved Permanently redirect to tell the search engines not to index or list http://<either hostname>/features/<anything> in search results, but rather to index and list only http://subdomain.example.com/<anything> for "features" URLs.
And since you are using some "rewriting component" that internally rewrites requests for subdomain.example.com URLs to the /features filepath, this 301 redirect must be invoked *only* if the /features filepath is directly-requested by the HTTP client as a URL, and not if an internal server request for the /features filepath occurs as the result of the action of your "rewriting component."
Note the distinction here between URLs and filepaths, as it is critical to understanding the issues.
The typical construct for use in .htaccess that you'll find posted here on this forum looks like this:
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /features(/[^\ ]*)?\ HTTP/
RewriteRule ^features(/(.*))?$ http://subdomain.example.com/$2 [R=301,L]
Here, we look at THE_REQUEST, so that this rule is only invoked if an HTTP client asks for /features as a URL. This rule will take no action when the /features path is internally requested as a result of the action of your "rewriting component." This prevents an 'infinite' rewrite/redirect loop.
Jim