.htaccess cannot do what you want.
Here is your code:
(theme header file)
PHP Code:
<?php
session_start();
if(!isset($_SESSION['shownsplash'])) {
$_SESSION['shownsplash'] = true;
//store the link that the visitor was coming to in another session variable
$_SESSION['incomingLink'] = $_SERVER['REQUEST_URI'];
//redirect to your splash page
header('Location: http://example.com/splash');
exit;
}
//rest of your header file here
?>
In your splash page:
PHP Code:
<?php
session_start();
if(isset($_SESSION['incomingLink'])) {
$link = $_SESSION['incomingLink'];
} else {
//your wordpress root
$link = 'http://example.com/blog';
}
//reset of your splash page here
?>
<!-- your 'continue to site link' which will bring your visitors to wherever they meant to go -->
<a href="<?php echo $link; ?>">Continue to Site</a>
I'm not sure how the rest of the people on this forum feel, but I'm not a huge fan of people asking for solutions without being to put in even the time to think about the logic, let alone the time to come up with some sample code.
Bookmarks