onclick="OnReportSelect('JACOBSO3','http ://www.bipc.com/bio?id=')"Redirect 302 /^bio?id=JACOBSO3 /richard-jacobson/
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^bio?id=JACOBSO3/?$ /richard-jacobson [R=301,L,NC]RewriteRule ^bio\.id\.JACOBSO3?$ /richard-jacobson [NC,L]
This question has been answered by jeffsydor. See the first response.
<div class="contact-widgets"> <div class="widget"> <a href="http://www.linkedin.com/in/richardajacobson" class="linkedin">REACH OUT ON LINKEDIN</a> </div> <div class="widget"> <a href="vcard.vcf?id=561" class="vcard">DOWNLOAD vCARD</a> </div> <div class="widget"> <a href="" class="print">PRINT MY BIO</a> </div> </div>
<?php
//error_reporting(E_ALL);
//ini_set('display_errors','1');
if ($modx->event->name != 'OnPageNotFound') {return false;}
$alias = $modx->context->getOption('request_param_alias', 'q');
if (!isset($_REQUEST[$alias])) {return false;}
$request = $_REQUEST[$alias];
$tmp = explode('/', $request);
// let's check $tmp[0], it have to be among of the next containers: unis, courses, reviews,ODs, videos
// TODO: values mask checking!!!!
if("bio" == trim(htmlspecialchars(urldecode($tmp[0])),ENT_QUOTES)){ // attorney page for CRM needs only
$q = $modx->newQuery('modResource');
$q->leftJoin('modTemplateVarResource','TV','TV.contentid=modResource.id');
$q->where( array(
'template' => 16, //Attorneys
'context_key' => $modx->context->key,
'TV.tmplvarid' => 61, // AttorneyEmployeeID
'TV.value' => strtoupper(trim(htmlspecialchars(urldecode($_GET['id'])),ENT_QUOTES)) //htmlspecialchars(urldecode($_GET['id']))
));
$q->select(array('modResource.id'));
$q->prepare();
$q->stmt->execute();
$att = $q->stmt->fetch(PDO::FETCH_ASSOC);
if(!$att) return false;
$modx->sendForward($att['id']);
}
$q = $modx->newQuery('modResource');
$q->where( array('alias' => $tmp[0], 'template:IN' => array(16,12,28,22,37,38,45,50), 'context_key' => $modx->context->key) );
$q->select(array('id'));
$q->prepare();
$q->stmt->execute();
$cont = $q->stmt->fetch(PDO::FETCH_ASSOC);
if(!$cont) return false;
$_GET['type'] = $_REQUEST['type'] = $tmp[1];
$modx->sendForward($cont['id']);$att = $q->stmt->fetch(PDO::FETCH_ASSOC); if(!$att) return false; $modx->sendForward($att['id']);
'template' => 16, //Attorneys
...
'TV.tmplvarid' => 61, // AttorneyEmployeeIDThese requests are coming from our intranet.