Redirect .html to non

RewriteEngine On
RewriteBase /

#redirect to remove the .html extension
RewriteRule ^(.+).html$ $1 [L,NC,R=301]


#This snippet is experimental, the above breaks some of the media library .html requests - This seems to work but still testing


#redirect to remove the .html extension
RewriteCond %{REQUEST_URI} !^/wp-includes
RewriteCond %{REQUEST_URI} !^/wp-admin
RewriteCond %{REQUEST_URI} !^/wp-content
RewriteRule ^(.+).html$ $1 [L,NC,R=301]

Timed Redirect

//Timed Redirect
$visitor_ip = $_SERVER['REMOTE_ADDR'];
$current_time = time();
$launch_time = 1288589400;//Oct 31 11:30pm MST
$test_launch_time = 1288283536;//Change to whatever for testing

$ips_with_access = array('','');//IP's with access

if($current_time < $launch_time){
foreach($ips_with_access as $ips){
if($visitor_ip == $ips) $have_access = true;
if(!$have_access) header('Location:');//Redirect page

PHP redirect using query string


$redirect = $_GET['redirect'];

/* Browse to
to access the redirect page */

if($redirect == "true")

else header('Location:');


Redirect multiple pages-htaccess

redirect 301 /the-wordress-page

redirect 301 /the-second-wordress-page

RewriteEngine on
RewriteRule (.*)$1 [R=301,L]