I have developed a site named www.printingchemical.com, full of information portal on chemicals. I have another two domains. How can I make a code to redirect from that two domain to my www.printingchemical.com site? Waiting for this code. Thanks in advance.
Put this in a .htaccess file in the root folder of your other two domains RewriteEngine On RewriteBase / RewriteRule ^/?(.*)$ http://www.printingchemical.com/$1 [R=301,L] Code (markup):
Javascript can be disabled, so its not reliable. Theirs many ways: 1. .htaccess 2. php header location 3. html meta refresh tag 4. javascript - window.location But i'd recommend 1 and 2 since they don't rely on client-side configuration, theirfore more reliable.
This code works under Java scripts with PHP Code Example: <? $p=$_GET['p']; $display ="SELECT * FROM tbl_data WHERE p='$p'"; $result=mysql_query($display); $display= mysql_fetch_array($result); echo'<script>window.location="index.php?menu";</script>'; ?> index.php?menu exgo to menu page)
header is very reliable in my experience. can also be used for refresh which is useful in conditional functions.