I'm struggling with a mod_rewrite problem. Basically I need to do a secret redirect on the domain name, going from
http://domainname.com.someotherstuff.com
to
http://domainname.com
This rule should affect all subdirectories as well.
I've understood there are three steps:
- tell the system if the path matches what we're looking for
- define the RewriteRule
- pass the new path to the old one so that the system knows (even if it doesn't show) that the two match
I've looked up several posts and resources (the closest ones being this and this) but none of them can solve both my problems – rewriting and secrecy – at once.
Can anybody point me in the right direction?
Moreover, can someone explain the tradeoff between a hidden redirect and a 301? Hidden redirect is not search engine friendly, correct?
Thanks a lot!