Tag Info

Hot answers tagged


As far as I can see, it is not possible to use a custom 404 ErrorDocument directive in your htaccess file because WordPress' index.php will always be found when processing the htaccess content. (unless ofcourse index.php got deleted for some reason) Because index.php is found, it will not trigger the '404 not found' ErrorDocument directive. The ...


function checkArtist() { $page = get_page_by_path($_SERVER['REQUEST_URI'].'/',OBJECT,'artist'); if($page){ header("HTTP/1.1 301 Moved Permanently"); header("Location: /artist".$_SERVER['REQUEST_URI']); } } add_action( 'wp', 'checkArtist' ); I add a custom hook using wp which as the article says: This hook is one effective ...

Only top voted, non community-wiki answers of a minimum length are eligible