Link to home
Start Free TrialLog in
Avatar of DavidHannen
DavidHannenFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How do I redirect to a wordpress page

I have two domains. One is Linux and one Windows. I am developing sites in both and have different domain names for each. Windows has a standard HTML website on it, the Linux server has Wordpress on it.

Whichever one is not  the 'public' and  'live' domain I want to forward to the other domain

At the moment i need to forward all traffic from the windows HTML site to the Wordpress site - but the code I have used in the past for this will not work . (See code below)

I need to forward from a Window server HTML website to a Wordpress websitesite page. How do I make this happen?

Thanks for the help.

 
<head>
<META http-equiv="refresh" content="5; URL=http://www.xxxxxxxx.xxx.uk/index.htm">
    <title>HoldingPage</title>
    <style type="text/css">
        .style1
        {
            width: 410px;
        }
    </style>
</head>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of andrewbleakley
andrewbleakley
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Should that be index.php?
Also missing quote:

content="5
nevermind that quote nonsense
Avatar of kumaranmca
kumaranmca

Hi,

Try the below code..its helpful for you..
<?php
/* This will give an error. Note the output
 * above, which is before the header() call */
header('Location: http://www.example.com/');
?>

Open in new window

using htaccess redirect your website...

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]


Avatar of DavidHannen

ASKER

Thanks - it worked fine without the '/page name.php'