Mask Redirect 1 Domain to Another with HTACCESS

Discussion in 'Apache' started by FPForum, Feb 14, 2017.

  1. #1
    Having some problems with this. If someone visits domain1.com/page1.html I would like that page to mask redirect to domain2.com/directory/index.php.

    Here is the code I'm trying in my public_html htaccess, with no success:
    
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^http://www.domain1.com/page1.html
    RewriteRule ^(.*) http://www.domain2.com/directory/index.php [P]
    
    Code (markup):
    Any help would be appriciated!
     
    FPForum, Feb 14, 2017 IP