treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] htaccess redirect with masking...

  • I've setup a basic redirect in the htaccess file:
    redirect http://www.old-domain.com//subfolder http://www.new-domain.com/subfolder/

    I would also like to include masking so the old-domain name is displayed instead of new-domain name when the user is redirected.

    Thank you,
    CM
  • (This probably qualifies as an "Other Discussions" topic: it certainly has nothing to do with CSS.)

    I would also like to include masking so the old-domain name is displayed instead of new-domain name when the user is redirected.
    @charlie

    apache doesn't allow this, for both practical and security reasons.

    Do you have both domains on the same host? just point them both at the same root directory.
  • Yes, both domains are on the same host. However redirect will only effect on subdirectory, not whole site.