-2

I have 2 domains let's say example.com and example.mynetwork.com I am using parallels plesk webserver for main domain cpanel for subdomain The subdomain example forward with masking to example.com can I make the website only work at example.mynetwork.com and if anyone visit the website example.com he redirect to example.mynetwork.com?

1 Answers1

0

You can reach transparent redirect(or masking as you said) with frames, place following HTML code into index.html on example.mynetwork.com:

<FRAMESET>
<FRAME SRC="http://example.com/" NORESIZE>
<NOFRAMES>
Your browser does not support frames.
</NOFRAMES>
</FRAMESET>

In case of simple redirect: Here simple index.php which redirects visitors to http://example.mynetwork.com

<?php

header("Location: http://example.mynetwork.com/");
die();

Place this file into /httpdocs of example.com

Oleg Neumyvakin
  • 9,706
  • 3
  • 58
  • 62
  • but anway example.mynetwork redirect to example.com but with masking – Odine Gaming Network Jul 04 '15 at 14:40
  • You asking how to set up redirect from example.com to example.mynetwork.com, I'm right? If example.mynetwork.com redirects you back to example.com may be you have some settings for doing this? – Oleg Neumyvakin Jul 04 '15 at 14:58
  • the subdomain http://example.mynetwork.com forwarded to example.com i want the user can't connect to example.com directly.. he must open this domain http://example.mynetwork.com and it will show him the website with masking. – Odine Gaming Network Jul 05 '15 at 07:34
  • Ok, I think i get you, please check answer, I've add frame forwarding example. – Oleg Neumyvakin Jul 05 '15 at 10:11