使用.htaccess在一段时间后重定向页面

I am trying to redirect the click a tell HTTP API using .htaccess file.

I need the system to stay on that api page to send a message and then redirect to another page after 10 sec. Here is what i found yet :

   RewriteRule ^mypage\.html$  /mypage2.html [R]

But i want to insert time here for page 1 to stay .

any suggestions ?

You can do this via a temporary file handler in your site root. Create a file called timer.php with this code:

<html>
<head>
   <meta http-equiv="REFRESH" 
              content="<?php echo $_GET['delay'];?>;URL=<?php echo $_GET['target'];?>">
</head>
</html>

Then have your rewrite as this:

RewriteEngine On

RewriteRule ^mypage\.html$ timer.php?delay=10&target=/mypage2.html [L,NC]

This will redirect the /mypage.html to /mypage2.html after 10 seconds delay. If you want you can display some custom message/image for these 10 seconds.