getClickData1ParamName() public static method

public static getClickData1ParamName ( )
コード例 #1
0
    /**
     * generates code for .htaccess mod_rewrite
     *
     */
    private function generateHtaccessCode($prefix, $separator, $suffix) {
    	if($separator == '') {
    		$separator = '/';
    	}

    	$aid = Pap_Tracking_Request::getAffiliateClickParamName();
    	$bid = Pap_Tracking_Request::getBannerClickParamName();
    	$channel = Pap_Tracking_Request::getChannelParamName();
    	$data1 = Pap_Tracking_Request::getClickData1ParamName();

    	$tb = new Pap_Tracking_TrackerBase();
    	$scriptUrl = $tb->getScriptUrl("click.php");

    	$separators = str_replace($separator, '', '_-/');
    	
        $htaccessCode =
"# Start Post Affiliate SEO Code----\n
RewriteEngine On\n
RewriteRule ^".$prefix."([a-zA-Z0-9".$separators."]+)".$suffix."\$ $scriptUrl?$aid=\$1 [R=301,L]\n
RewriteRule ^".$prefix."([a-zA-Z0-9".$separators."]+)".$separator."([a-zA-Z0-9".$separators."]+)".$suffix."\$ $scriptUrl?$aid=\$1&$bid=\$2 [R=301,L]\n
RewriteRule ^".$prefix."([a-zA-Z0-9".$separators."]+)".$separator."([a-zA-Z0-9".$separators."]+)".$separator."([a-zA-Z0-9".$separators."]+)".$suffix."\$ $scriptUrl?$aid=\$1&$bid=\$2&$channel=\$3 [R=301,L]\n
RewriteRule ^".$prefix."([a-zA-Z0-9".$separators."]+)".$separator."([a-zA-Z0-9".$separators."]+)".$separator."([a-zA-Z0-9".$separators."]+)".$separator."([a-zA-Z0-9".$separators."]+)".$suffix."\$ $scriptUrl?$aid=\$1&$bid=\$2&$channel=\$3&$data1=\$4 [R=301,L]\n
# End of Post Affiliate SEO Code\n";

        return $htaccessCode;
    }