Beispiel #1
0
function vbseo_apply_crr($ourl, &$nofollow)
{
    global $vbseo_crules;
    $newurl = '';
    if (!isset($vbseo_crules)) {
        $vbseo_crules = vbseo_fw_customurl('rules');
    }
    if ($vbseo_crules) {
        if (strpos($ourl, '#') !== false) {
            list($ourl1, $ourl2) = explode('#', $ourl);
        } else {
            $ourl1 = $ourl;
            $ourl2 = '';
        }
        $newurl1 = preg_replace(array_keys($vbseo_crules), $vbseo_crules, $ourl1) . ($ourl2 ? '#' . $ourl2 : '');
        if ($ourl != $newurl1) {
            $newurl = $newurl1;
            if (strstr($newurl, '[NF]')) {
                $newurl = str_replace('[NF]', '', $newurl);
                $nofollow = true;
            }
        }
    }
    return $newurl;
}
Beispiel #2
0
                 }
             }
         }
         if ($vbseo_crules) {
             $newurl = preg_replace(array_keys($vbseo_crules), $vbseo_crules, $vbseo_requrl);
             if ($vbseo_requrl != $newurl) {
                 if ($vbseo_relpath && !strstr($newurl, $vbseo_relpath)) {
                     $newurl = $vbseo_relpath . $newurl;
                 }
                 vbseo_safe_redirect($newurl, array(), 1);
             }
         }
     }
 }
 if (!$vbseo_file_exists && !$vbseo_file_exists_deep) {
     $c301_fw = vbseo_fw_customurl('301');
     $vbseo_url_2 = $c301_fw ? preg_replace(array_keys($c301_fw), $c301_fw, $vbseo_requrl) : $vbseo_requrl;
     if ($vbseo_url_2 != $vbseo_requrl) {
         vbseo_safe_redirect($vbseo_url_2, array(), true);
     } else {
         if ($vbseo_url_2 = vbseo_back_customurl($vbseo_url_, 'rules')) {
             vbseo_set_self($vbseo_relpath . $vbseo_url_2);
             $vbseo_purl = parse_url(preg_replace('#\\?.*$#', '', $vbseo_url_2));
             $vbseo_found_fn = $vbseo_purl['path'];
             $vbseo_found = true;
         }
     }
     if (!$vbseo_found && !VBSEO_RELPATH) {
         if (VBSEO_REWRITE_POLLS && ($vbseo_arr = vbseo_check_url('VBSEO_URL_POLL', $vbseo_url_))) {
             vbseo_set_self('poll.' . VBSEO_VB_EXT . '?' . VBSEO_ACTION_URI . '=showresults&' . VBSEO_POLLID_URI . '=' . $vbseo_arr['poll_id']);
             $vbseo_found_fn = 'poll.' . VBSEO_VB_EXT;