Worpress register special URL

how can i register a special url (slug) in WordPress so that i don’t get an 404?

At the moment i set the status_header to 200 but i think that is not the right way? right?

if (is_404())
{
     $curUrl_arr = explode("/", preg_replace("/^//", '', $_SERVER['REQUEST_URI']));
     if($curUrl_arr[0] == 'XXXXXX')
     {
            status_header(200);
            // some code
     }
}

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Read more here: Worpress register special URL

Leave a Reply

Your email address will not be published. Required fields are marked *