• hi,

    I have a wordpress running site, I would like to set it up that evenryone who enters my site will have a static html site displayed once, that after 2 seconds redirected to wordpress site.
    so what I want to achieve:
    1. user enters URL of my site
    2. static html page is displayed
    3. after 2sec user is redirected to my wordrpress site.

    how can I do this? i tried to edit htaccess but than the static html page loops itself instead of redirecting to wordpress site.

    thanks for tips!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The simplest way is probably to set an HTML refresh header on your static page, but you would need to use PHP to do that.

    <?php
      header( "refresh:5;url=wherever.php" );
      echo 'You\'ll be redirected in about 5 secs. If not, click <a href="wherever.php">here</a>.';
      exit;
    ?>
    <!-- now add the rest of your static page here -->

    It is a good idea to put the link in for folks to click on, as technically the refresh header is a proprietary header introduced by Netscape I think, but it is almost universally supported in modern browsers.

    Thread Starter wankus

    (@wankus)

    thanks, but this doesn’t resolve my problem as the static page reloops on itself and doesnt redirect to main wordpress site…

    If it does that you haven’t tried what I have told you to do above…

    Thread Starter wankus

    (@wankus)

    well, i just created start.php file with code

    <?php
        header("Refresh: 3; url=index.php");
        ?>

    and then the rest of static page. than in htaccess I addedd
    DirectoryIndex start.php
    and the page doesnt redirect to index.php (wordpress site)
    so i guess this has sth to do with wrong htaccess ?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘wordpress and static html page (landing)’ is closed to new replies.