Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.

404 Error Rewrite

Check the 404s

Finding 404s and counting them to make a decision on what to rewrite/block/add/honeypot

grep ' 404 ' /path/to/your/apache_error.log | awk -F' ' '{print $7}' | sort | uniq

Sample Rewrite

The apache config (sites-available) is where something like this would go:

RewriteEngine On
RewriteCond %{REQUEST_URI} /old-page-1/ [OR]
RewriteCond %{REQUEST_URI} /old-page-2/ [OR]
RewriteCond %{REQUEST_URI} /old-page-3/
RewriteRule ^ - [L,R=410]

Parse logs, Create Rewrite Rules

But man… writing all those sucks. Here is the automated way

#!/bin/bash

current_date=$(date "+%Y-%m-%d_%H%M")

logfile="/var/www/logs/somedomain.com.access.log"
wplogfile="im-wp-${current_date}.access.log"
tempfile="im-wp.access.tmp"
fuzzinglogfile="im.fuzzing-${current_date}.access.log"
fuzzingtempfile="im.fuzzing.tmp"
rewritecondfile="im.rewrite.tmp"
rewritelogfile="im.rewrites-${current_date}.txt"

# note I'm choosing a few things I want to manually take care of, you do likewise for your data set
grep ' 404 ' $logfile | awk -F' ' '{print $7}' | while read -r line; do
    if [[ $line == /wp* ]]; then
        echo $line >> $tempfile
    elif [[ $line =~ ^/[0-9]{4}/ || $line =~ ^/.+/$ || $line =~ ^/portfolio.* || $line =~ ^/news.* || $line =~ ^/journey.* || $line =~ ^/how-.* || $line =~ ^/tag.* || $line =~ ^/cat.* || $line =~ ^/articles.* || $line =~ ^/\?auth.* || $line =~ ^/3-.* ]]; then
        echo "RewriteCond %{REQUEST_URI} $line [OR]" >> $rewritecondfile
    else
        echo $line >> $fuzzingtempfile
    fi
done

echo "RewriteEngine On" >> $rewritelogfile
sort $rewritecondfile | uniq >> $rewritelogfile
echo "RewriteRule ^ - [G,NC]" >> $rewritelogfile

# Make entries unique
sort $tempfile | uniq > $wplogfile
sort $fuzzingtempfile | uniq > $fuzzinglogfile

# Remove temp files
rm $tempfile
rm $fuzzingtempfile
rm $rewritecondfile

Example Script Output

This is meant to be used in the .htaccess or configs to redirect 404s. You can see how it would been difficult and time consuming to do this by hand.

        RewriteEngine On
        RewriteCond %{REQUEST_URI} /10-best-dividend-stocks/ [OR]
        RewriteCond %{REQUEST_URI} /10-rules-to-create-a-great-brand-name/ [OR]
        RewriteCond %{REQUEST_URI} /10-rules-to-create-a-great-brand-name/feed/ [OR]
        RewriteCond %{REQUEST_URI} /10-steps-to-making-a-million-dollars-in-the-market-report-by-the-montey-fool/ [OR]
        RewriteCond %{REQUEST_URI} /10-steps-to-making-a-million-dollars-in-the-market-report-by-the-montey-fool/feed/ [OR]
        RewriteCond %{REQUEST_URI} /10-things-you-need-to-know-about-compound-interest/ [OR]
        RewriteCond %{REQUEST_URI} /10-things-you-need-to-know-about-compound-interest/feed/ [OR]
        RewriteCond %{REQUEST_URI} /10bestdividendstocksadbanner/ [OR]
        RewriteCond %{REQUEST_URI} /2-things-i-learnt-from-berkshire-hathaway-annual-report/ [OR]
        RewriteCond %{REQUEST_URI} /2-things-i-learnt-from-berkshire-hathaway-annual-report/feed/ [OR]
        RewriteCond %{REQUEST_URI} /20.* [OR]
        RewriteCond %{REQUEST_URI} /3-best-resources-for-forex-trading [OR]
        RewriteCond %{REQUEST_URI} /3-best-resources-for-forex-trading/ [OR]
        RewriteCond %{REQUEST_URI} /3-best-resources-for-forex-trading/2 [OR]
        RewriteCond %{REQUEST_URI} /3-best-resources-for-forex-trading/2/ [OR]
        RewriteCond %{REQUEST_URI} /3-best-resources-for-forex-trading/feed/ [OR]
        RewriteCond %{REQUEST_URI} /3-best-resources-for-forex-trading/somedomain-babypips-logo [OR]
        RewriteCond %{REQUEST_URI} /3-best-resources-for-forex-trading/somedomain-babypips-logo/ [OR]
        RewriteCond %{REQUEST_URI} /3-best-resources-for-forex-trading/somedomain-forexfactory-logo [OR]
        RewriteCond %{REQUEST_URI} /3-best-resources-for-forex-trading/somedomain-forexfactory-logo/ [OR]
        RewriteCond %{REQUEST_URI} /3-dividend-stocks-to-own-today [OR]
        RewriteCond %{REQUEST_URI} /3-dividend-stocks-to-own-today/ [OR]
        RewriteCond %{REQUEST_URI} /3-dividend-stocks-to-own-today/feed/ [OR]
        RewriteCond %{REQUEST_URI} /3-facts-about-credit-cards [OR]
        RewriteCond %{REQUEST_URI} /3-facts-about-credit-cards/ [OR]
        RewriteCond %{REQUEST_URI} /3-facts-about-credit-cards/feed/ [OR]
        RewriteCond %{REQUEST_URI} /3-important-points-to-achieve-financial-freedom [OR]
        RewriteCond %{REQUEST_URI} /3-important-points-to-achieve-financial-freedom/ [OR]
        RewriteCond %{REQUEST_URI} /3-important-points-to-achieve-financial-freedom/feed/ [OR]
        RewriteCond %{REQUEST_URI} /3-strategies-in-shares-investing [OR]
        RewriteCond %{REQUEST_URI} /3-strategies-in-shares-investing/ [OR]
        RewriteCond %{REQUEST_URI} /3-strategies-in-shares-investing/feed/ [OR]
        RewriteCond %{REQUEST_URI} /3-things-i-learnt-from-a-typhoon-hit-holiday [OR]
        RewriteCond %{REQUEST_URI} /3-things-i-learnt-from-a-typhoon-hit-holiday/ [OR]
        RewriteCond %{REQUEST_URI} /3-things-i-learnt-from-a-typhoon-hit-holiday/feed/ [OR]
        RewriteCond %{REQUEST_URI} /3-ways-to-upsize-your-investments [OR]
        RewriteCond %{REQUEST_URI} /3-ways-to-upsize-your-investments/ [OR]
        RewriteCond %{REQUEST_URI} /3-ways-to-upsize-your-investments/feed/ [OR]
        RewriteCond %{REQUEST_URI} /3CX/ [OR]
        RewriteCond %{REQUEST_URI} /4-things-i-learnt-from-american-sniper/ [OR]
        RewriteCond %{REQUEST_URI} /4-things-i-learnt-from-american-sniper/feed/ [OR]
        RewriteCond %{REQUEST_URI} /5-simple-steps-to-retire-early/ [OR]
        RewriteCond %{REQUEST_URI} /5-simple-steps-to-retire-early/2/ [OR]
        RewriteCond %{REQUEST_URI} /5-simple-steps-to-retire-early/feed/ [OR]
        RewriteCond %{REQUEST_URI} /5-simple-steps-to-retire-early/somedomain-beachchairandumbrella-on-sand/ [OR]
        RewriteCond %{REQUEST_URI} /?author.*[OR]
        RewriteCond %{REQUEST_URI} /ALFA_DATA/alfacgiapi/ [OR]
        RewriteCond %{REQUEST_URI} /Asterisk/ [OR]
        RewriteCond %{REQUEST_URI} /Broadsoft/ [OR]
        RewriteCond %{REQUEST_URI} /Config/ [OR]
        RewriteCond %{REQUEST_URI} /Customer/config/ [OR]
        RewriteCond %{REQUEST_URI} /Customer/configs/ [OR]
        RewriteCond %{REQUEST_URI} /Customer/configs/phone/ [OR]
        RewriteCond %{REQUEST_URI} /GponForm/diag_Form?images/ [OR]
        RewriteCond %{REQUEST_URI} /HNAP1/ [OR]
        RewriteCond %{REQUEST_URI} /IPPhone.cfg/ [OR]
        RewriteCond %{REQUEST_URI} /IPPhoneBackup/ [OR]
        RewriteCond %{REQUEST_URI} /NON_EXISTING_PATH/ [OR]
        RewriteCond %{REQUEST_URI} /OLD/ [OR]
        RewriteCond %{REQUEST_URI} /PMA/ [OR]
        RewriteCond %{REQUEST_URI} /PMA2005/ [OR]
        RewriteCond %{REQUEST_URI} /Phones/Polycom/ [OR]
        RewriteCond %{REQUEST_URI} /PhpMyAdmin/ [OR]
        RewriteCond %{REQUEST_URI} /Poly/ [OR]
        RewriteCond %{REQUEST_URI} /Poly/sip/ [OR]
        RewriteCond %{REQUEST_URI} /Poly/voip/ [OR]
        RewriteCond %{REQUEST_URI} /PolyTemplate/ [OR]
        RewriteCond %{REQUEST_URI} /README/ [OR]
        RewriteCond %{REQUEST_URI} /SPA112/ [OR]
        RewriteCond %{REQUEST_URI} /TP/ [OR]
        RewriteCond %{REQUEST_URI} /TP/html/public/ [OR]
        RewriteCond %{REQUEST_URI} /TP/public/ [OR]
        RewriteCond %{REQUEST_URI} /Utilities/configuration/ [OR]
        RewriteCond %{REQUEST_URI} /Utilities/configuration/exportFile?source=7/ [OR]
        RewriteCond %{REQUEST_URI} /Utilities/configuration/phoneBackup/ [OR]
        RewriteCond %{REQUEST_URI} /Yealink/ [OR]
        RewriteCond %{REQUEST_URI} /_asterisk/ [OR]
        RewriteCond %{REQUEST_URI} /_ignition/health-check/ [OR]
        RewriteCond %{REQUEST_URI} /_polycom_uc/ [OR]
        RewriteCond %{REQUEST_URI} /about/ [OR]
        RewriteCond %{REQUEST_URI} /added-suntec-reit-to-portfolio/ [OR]
        RewriteCond %{REQUEST_URI} /added-suntec-reit-to-portfolio/feed/ [OR]
        RewriteCond %{REQUEST_URI} /admin/login/ [OR]
        RewriteCond %{REQUEST_URI} /admin/modules/ [OR]
        RewriteCond %{REQUEST_URI} /admin/sip.conf/ [OR]
        RewriteCond %{REQUEST_URI} /admin/voice/ [OR]
        RewriteCond %{REQUEST_URI} /adminer/ [OR]
        RewriteCond %{REQUEST_URI} /administrator/ [OR]
        RewriteCond %{REQUEST_URI} /alibaba-to-buy-10-35-stake-in-singapore-post/ [OR]
        RewriteCond %{REQUEST_URI} /alibaba-to-buy-10-35-stake-in-singapore-post/feed/ [OR]
        RewriteCond %{REQUEST_URI} /alibabas-singles-day-sales-at-9-3bn/ [OR]
        RewriteCond %{REQUEST_URI} /alibabas-singles-day-sales-at-9-3bn/feed/ [OR]
        RewriteCond %{REQUEST_URI} /amazon-buy-now/ [OR]
        RewriteCond %{REQUEST_URI} /app/provision/ [OR]
        RewriteCond %{REQUEST_URI} /applying-for-cpf-investment-account/ [OR]
        RewriteCond %{REQUEST_URI} /applying-for-cpf-investment-account/feed/ [OR]
        RewriteCond %{REQUEST_URI} /articles.* [OR]
        RewriteCond %{REQUEST_URI} /assets/app/something/services/AppModule.class/ [OR]
        RewriteCond %{REQUEST_URI} /author.* [OR]
        RewriteCond %{REQUEST_URI} /axis/ [OR]
        RewriteCond %{REQUEST_URI} /axis2-admin/ [OR]
        RewriteCond %{REQUEST_URI} /axis2/ [OR]
        RewriteCond %{REQUEST_URI} /axis2/axis2-admin/ [OR]
        RewriteCond %{REQUEST_URI} /back-to-the-future/ [OR]
        RewriteCond %{REQUEST_URI} /back-to-the-future/feed/ [OR]
        RewriteCond %{REQUEST_URI} /backup/ [OR]
        RewriteCond %{REQUEST_URI} /bak/ [OR]
        RewriteCond %{REQUEST_URI} /beifen/ [OR]
        RewriteCond %{REQUEST_URI} /bf/ [OR]
        RewriteCond %{REQUEST_URI} /blog/ [OR]
        RewriteCond %{REQUEST_URI} /blog/wp-admin/includes/ [OR]
        RewriteCond %{REQUEST_URI} /blog/wp-content/plugins/1-flash-gallery/ [OR]
        RewriteCond %{REQUEST_URI} /blog/wp-content/plugins/task-controller/ [OR]
        RewriteCond %{REQUEST_URI} /book-review-get-rich-with-dividends/ [OR]
        RewriteCond %{REQUEST_URI} /book-review-get-rich-with-dividends/feed/ [OR]
        RewriteCond %{REQUEST_URI} /book-review-start-late-finish-rich/ [OR]
        RewriteCond %{REQUEST_URI} /book-review-start-late-finish-rich/feed/ [OR]
        RewriteCond %{REQUEST_URI} /book-review-start-over-finish-rich/ [OR]
        RewriteCond %{REQUEST_URI} /book-review-start-over-finish-rich/feed/ [OR]
        RewriteCond %{REQUEST_URI} /boot/ [OR]
        RewriteCond %{REQUEST_URI} /broadworks/ [OR]
        RewriteCond %{REQUEST_URI} /buying-your-way-down/ [OR]
        RewriteCond %{REQUEST_URI} /buying-your-way-down/feed/ [OR]
        RewriteCond %{REQUEST_URI} /c/ [OR]
        RewriteCond %{REQUEST_URI} /cache_logistics_trust_logo/ [OR]
        RewriteCond %{REQUEST_URI} /cat.* [OR]
        RewriteCond %{REQUEST_URI} /cc-by-sa/ [OR]
        RewriteCond %{REQUEST_URI} /community/ [OR]
        RewriteCond %{REQUEST_URI} /conf/ [OR]
        RewriteCond %{REQUEST_URI} /configuration/ [OR]
        RewriteCond %{REQUEST_URI} /configuration/phoneBackup/ [OR]
        RewriteCond %{REQUEST_URI} /configure/ [OR]
        RewriteCond %{REQUEST_URI} /console/ [OR]
        RewriteCond %{REQUEST_URI} /containers/ [OR]
        RewriteCond %{REQUEST_URI} /cpfscreenshot1/ [OR]
        RewriteCond %{REQUEST_URI} /cpfscreenshot2/ [OR]
        RewriteCond %{REQUEST_URI} /cpfscreenshot3/ [OR]
        RewriteCond %{REQUEST_URI} /creating-a-new-portfolio/ [OR]
        RewriteCond %{REQUEST_URI} /creating-a-new-portfolio/feed/ [OR]
        RewriteCond %{REQUEST_URI} /css/ [OR]
        RewriteCond %{REQUEST_URI} /customer/account/create/ [OR]
        RewriteCond %{REQUEST_URI} /data/ [OR]
        RewriteCond %{REQUEST_URI} /dbadmin/ [OR]
        RewriteCond %{REQUEST_URI} /deal-analysis/page/2/ [OR]
        RewriteCond %{REQUEST_URI} /delayed-or-instant-gratification/ [OR]
        RewriteCond %{REQUEST_URI} /delayed-or-instant-gratification/feed/ [OR]
        RewriteCond %{REQUEST_URI} /demo/ [OR]
        RewriteCond %{REQUEST_URI} /digium/ [OR]
        RewriteCond %{REQUEST_URI} /digium_phones/ [OR]
        RewriteCond %{REQUEST_URI} /diguo/ [OR]
        RewriteCond %{REQUEST_URI} /directory/ [OR]
        RewriteCond %{REQUEST_URI} /discipline-in-investing/ [OR]
        RewriteCond %{REQUEST_URI} /discipline-in-investing/2/ [OR]
        RewriteCond %{REQUEST_URI} /discipline-in-investing/discipline-is-the-silent/ [OR]
        RewriteCond %{REQUEST_URI} /discipline-in-investing/feed/ [OR]
        RewriteCond %{REQUEST_URI} /disclaimer/ [OR]
        RewriteCond %{REQUEST_URI} /dividend-investment-coke-vs-pepsi/ [OR]
        RewriteCond %{REQUEST_URI} /dividend-investment-coke-vs-pepsi/feed/ [OR]
        RewriteCond %{REQUEST_URI} /dividend-paying-process/ [OR]
        RewriteCond %{REQUEST_URI} /dividend-paying-process/feed/ [OR]
        RewriteCond %{REQUEST_URI} /dlCustServFile.asp/ [OR]
        RewriteCond %{REQUEST_URI} /dms/AudioCodes/ [OR]
        RewriteCond %{REQUEST_URI} /dms/aastra/ [OR]
        RewriteCond %{REQUEST_URI} /dms/config/ [OR]
        RewriteCond %{REQUEST_URI} /dms/grandstream/ [OR]
        RewriteCond %{REQUEST_URI} /dms/gs/ [OR]
        RewriteCond %{REQUEST_URI} /dms/polycom/ [OR]
        RewriteCond %{REQUEST_URI} /dms/polycom550/ [OR]
        RewriteCond %{REQUEST_URI} /dms/spa112/ [OR]
        RewriteCond %{REQUEST_URI} /docs/cplugError.html/ [OR]
        RewriteCond %{REQUEST_URI} /doing-stock-investing-the-right-way/ [OR]
        RewriteCond %{REQUEST_URI} /doing-stock-investing-the-right-way/2/ [OR]
        RewriteCond %{REQUEST_URI} /doing-stock-investing-the-right-way/feed/ [OR]
        RewriteCond %{REQUEST_URI} /donghuapian/baishe2qingshejieqi/ [OR]
        RewriteCond %{REQUEST_URI} /dongman/haizeiwang/ [OR]
        RewriteCond %{REQUEST_URI} /dongzuopian/lajingkuanghua1/ [OR]
        RewriteCond %{REQUEST_URI} /drawing-a-clear-line/ [OR]
        RewriteCond %{REQUEST_URI} /drawing-a-clear-line/feed/ [OR]
        RewriteCond %{REQUEST_URI} /e/DoPrint/ [OR]
        RewriteCond %{REQUEST_URI} /elastic/ [OR]
        RewriteCond %{REQUEST_URI} /env.bak/ [OR]
        RewriteCond %{REQUEST_URI} /env/ [OR]
        RewriteCond %{REQUEST_URI} /etc/asterisk/ [OR]
        RewriteCond %{REQUEST_URI} /etc/sip/ [OR]
        RewriteCond %{REQUEST_URI} /ews/MsExgHealthCheckd/ [OR]
        RewriteCond %{REQUEST_URI} /exactarget/ [OR]
        RewriteCond %{REQUEST_URI} /exchange/v1/ [OR]
        RewriteCond %{REQUEST_URI} /factory/ [OR]
        RewriteCond %{REQUEST_URI} /fc/68735/ [OR]
        RewriteCond %{REQUEST_URI} /finance-library/finance-books/ [OR]
        RewriteCond %{REQUEST_URI} /fix-code-violations-houses/feed/ [OR]
        RewriteCond %{REQUEST_URI} /for-borrowers/ [OR]
        RewriteCond %{REQUEST_URI} /for-borrowers/borrower-best-practices/ [OR]
        RewriteCond %{REQUEST_URI} /for-borrowers/borrower-conversation-helpers/ [OR]
        RewriteCond %{REQUEST_URI} /for-borrowers/investor-friendly-lenders/ [OR]
        RewriteCond %{REQUEST_URI} /for-lenders/ [OR]
        RewriteCond %{REQUEST_URI} /for-lenders/private-lender-best-practices/ [OR]
        RewriteCond %{REQUEST_URI} /for-lenders/private-lender-problems/ [OR]
        RewriteCond %{REQUEST_URI} /for-lenders/private-money-lenders/ [OR]
        RewriteCond %{REQUEST_URI} /foreclosure-effects-mckinney-tx-sellers-need-know/feed/ [OR]
        RewriteCond %{REQUEST_URI} /forums/search/z--%3E%22%3E%3C/script%3E%3Cscript%3Ealert%28document.domain%29%3C/script%3E/ [OR]
        RewriteCond %{REQUEST_URI} /freepbx/ [OR]
        RewriteCond %{REQUEST_URI} /freeswitch/ [OR]
        RewriteCond %{REQUEST_URI} /ftp/ [OR]
        RewriteCond %{REQUEST_URI} /geoip/ [OR]
        RewriteCond %{REQUEST_URI} /geoserver/web/ [OR]
        RewriteCond %{REQUEST_URI} /getting-out-of-debt/ [OR]
        RewriteCond %{REQUEST_URI} /getting-out-of-debt/feed/ [OR]
        RewriteCond %{REQUEST_URI} /gigaset/ [OR]
        RewriteCond %{REQUEST_URI} /glossary-gearing/ [OR]
        RewriteCond %{REQUEST_URI} /glossary-gearing/feed/ [OR]
        RewriteCond %{REQUEST_URI} /goform/downloadIadInfomation/ [OR]
        RewriteCond %{REQUEST_URI} /goip/ [OR]
        RewriteCond %{REQUEST_URI} /google-adsense/ [OR]
        RewriteCond %{REQUEST_URI} /google-adsense/feed/ [OR]
        RewriteCond %{REQUEST_URI} /grandsteam/ [OR]
        RewriteCond %{REQUEST_URI} /gs/ [OR]
        RewriteCond %{REQUEST_URI} /guide-cpf-investment-account/ [OR]
        RewriteCond %{REQUEST_URI} /guide-cpf-investment-account/feed/ [OR]
        RewriteCond %{REQUEST_URI} /guide-how-to-check-available-cpf-savings-for-investment/ [OR]
        RewriteCond %{REQUEST_URI} /guide-how-to-check-available-cpf-savings-for-investment/feed/ [OR]
        RewriteCond %{REQUEST_URI} /guide-investing-with-cpf/ [OR]
        RewriteCond %{REQUEST_URI} /guide-investing-with-cpf/feed/ [OR]
        RewriteCond %{REQUEST_URI} /guide-rules-of-reit/ [OR]
        RewriteCond %{REQUEST_URI} /guide-rules-of-reit/feed/ [OR]
        RewriteCond %{REQUEST_URI} /guide-what-is-a-reit/ [OR]
        RewriteCond %{REQUEST_URI} /guide-what-is-a-reit/feed/ [OR]
        RewriteCond %{REQUEST_URI} /guide-what-is-cash-investment/ [OR]
        RewriteCond %{REQUEST_URI} /guide-what-is-cash-investment/feed/ [OR]
        RewriteCond %{REQUEST_URI} /guide-what-is-passive-income/ [OR]
        RewriteCond %{REQUEST_URI} /guide-what-is-passive-income/feed/ [OR]
        RewriteCond %{REQUEST_URI} /guocanju/gl26/ [OR]
        RewriteCond %{REQUEST_URI} /guocanju/huanchengdvdban/ [OR]
        RewriteCond %{REQUEST_URI} /haiwaiju/huangfengdierji/ [OR]
        RewriteCond %{REQUEST_URI} /holding-on-to-the-winners/ [OR]
        RewriteCond %{REQUEST_URI} /holding-on-to-the-winners/feed/ [OR]
        RewriteCond %{REQUEST_URI} /how-much-investment-capital-do-i-need [OR]
        RewriteCond %{REQUEST_URI} /how-much-investment-capital-do-i-need/ [OR]
        RewriteCond %{REQUEST_URI} /how-much-investment-capital-do-i-need/feed/ [OR]
        RewriteCond %{REQUEST_URI} /how-to-increase-my-portfolio [OR]
        RewriteCond %{REQUEST_URI} /how-to-increase-my-portfolio/ [OR]
        RewriteCond %{REQUEST_URI} /how-to-increase-my-portfolio/feed/ [OR]
        RewriteCond %{REQUEST_URI} /how-to-maximise-your-profits-with-drip [OR]
        RewriteCond %{REQUEST_URI} /how-to-maximise-your-profits-with-drip/ [OR]
        RewriteCond %{REQUEST_URI} /how-to-maximise-your-profits-with-drip/feed/ [OR]
        RewriteCond %{REQUEST_URI} /how-to-maximise-your-profits-with-drip/somedomain-dripcomparison [OR]
        RewriteCond %{REQUEST_URI} /how-to-maximise-your-profits-with-drip/somedomain-dripcomparison/ [OR]
        RewriteCond %{REQUEST_URI} /html/public/ [OR]
        RewriteCond %{REQUEST_URI} /idx_config/ [OR]
        RewriteCond %{REQUEST_URI} /im/ [OR]
        RewriteCond %{REQUEST_URI} /index.action?redirect:http://www.interact.sh/ [OR]
        RewriteCond %{REQUEST_URI} /info/183973/ [OR]
        RewriteCond %{REQUEST_URI} /investing-in-reits/ [OR]
        RewriteCond %{REQUEST_URI} /investing-in-reits/feed/ [OR]
        RewriteCond %{REQUEST_URI} /investing-is-like-losing-weight/ [OR]
        RewriteCond %{REQUEST_URI} /investing-is-like-losing-weight/feed/ [OR]
        RewriteCond %{REQUEST_URI} /investing-time-in-forex-trading/ [OR]
        RewriteCond %{REQUEST_URI} /investing-time-in-forex-trading/feed/ [OR]
        RewriteCond %{REQUEST_URI} /investing-using-cpf/ [OR]
        RewriteCond %{REQUEST_URI} /investing-using-cpf/feed/ [OR]
        RewriteCond %{REQUEST_URI} /investment-is-like-wine/ [OR]
        RewriteCond %{REQUEST_URI} /investment-is-like-wine/feed/ [OR]
        RewriteCond %{REQUEST_URI} /investment-opportunities/ [OR]
        RewriteCond %{REQUEST_URI} /investment-opportunities/feed/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-airasiachart/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-airasiaflight/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-americansniper/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-appleinc-trade/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-bookofinvestment/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-businessman-working-on-the-currency-chart-line/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-clorox-logo/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-cscologo/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-currencyheatmap-201606/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-currencyheatmap-201609/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-ebookreader/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-hdblogo/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-icon/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-johnsonjohnson/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-marketoverlaptimings/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-news/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-pepsivscoke/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-portfoliodecember2014/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-pouringwine/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-reitinvesting/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-samsunggalaxygearvspebble/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-visacardcloseup/ [OR]
        RewriteCond %{REQUEST_URI} /somedomain-welcomesign/ [OR]
        RewriteCond %{REQUEST_URI} /somedomainlogo-3/ [OR]
        RewriteCond %{REQUEST_URI} /it-aint-complicated-actually/ [OR]
        RewriteCond %{REQUEST_URI} /it-aint-complicated-actually/feed/ [OR]
        RewriteCond %{REQUEST_URI} /journey.* [OR]
        RewriteCond %{REQUEST_URI} /keppel_reit_logo/ [OR]
        RewriteCond %{REQUEST_URI} /land-development-loans/ [OR]
        RewriteCond %{REQUEST_URI} /latest-hdb-cooling-measures/ [OR]
        RewriteCond %{REQUEST_URI} /learning-from-holiday-planning/ [OR]
        RewriteCond %{REQUEST_URI} /learning-from-holiday-planning/feed/ [OR]
        RewriteCond %{REQUEST_URI} /learning-from-the-best/ [OR]
        RewriteCond %{REQUEST_URI} /learning-from-the-best/feed/ [OR]
        RewriteCond %{REQUEST_URI} /legal-and-taxes/assn{c/ [OR]
        RewriteCond %{REQUEST_URI} /linksys/ [OR]
        RewriteCond %{REQUEST_URI} /m/79417/ [OR]
        RewriteCond %{REQUEST_URI} /mac/ [OR]
        RewriteCond %{REQUEST_URI} /main/ [OR]
        RewriteCond %{REQUEST_URI} /my-current-portfolio/ [OR]
        RewriteCond %{REQUEST_URI} /my-current-portfolio/feed/ [OR]
        RewriteCond %{REQUEST_URI} /myadmin/ [OR]
        RewriteCond %{REQUEST_URI} /mysql-admin/ [OR]
        RewriteCond %{REQUEST_URI} /mysql/ [OR]
        RewriteCond %{REQUEST_URI} /mysqladmin/ [OR]
        RewriteCond %{REQUEST_URI} /mysqlmanager/ [OR]
        RewriteCond %{REQUEST_URI} /new/ [OR]
        RewriteCond %{REQUEST_URI} /news/.* [OR]
        RewriteCond %{REQUEST_URI} /old/.* [OR]
        RewriteCond %{REQUEST_URI} /openserver/phpmyadmin/ [OR]
        RewriteCond %{REQUEST_URI} /order-help/shipping-delivery/ [OR]
        RewriteCond %{REQUEST_URI} /owa/ [OR]
        RewriteCond %{REQUEST_URI} /own-home/ [OR]
        RewriteCond %{REQUEST_URI} /own-home/feed/ [OR]
        RewriteCond %{REQUEST_URI} /p/ [OR]
        RewriteCond %{REQUEST_URI} /panasonic/ [OR]
        RewriteCond %{REQUEST_URI} /passing-of-a-great-leader/ [OR]
        RewriteCond %{REQUEST_URI} /passing-of-a-great-leader/feed/ [OR]
        RewriteCond %{REQUEST_URI} /patior/ [OR]
        RewriteCond %{REQUEST_URI} /patior/patior/ [OR]
        RewriteCond %{REQUEST_URI} /payment/ [OR]
        RewriteCond %{REQUEST_URI} /pbx/ [OR]
        RewriteCond %{REQUEST_URI} /pbx/digium/ [OR]
        RewriteCond %{REQUEST_URI} /pbx/provisioning/ [OR]
        RewriteCond %{REQUEST_URI} /phone/ [OR]
        RewriteCond %{REQUEST_URI} /phoneprov/ [OR]
        RewriteCond %{REQUEST_URI} /phoneprov/configs/ [OR]
        RewriteCond %{REQUEST_URI} /phones/ciscospa/ [OR]
        RewriteCond %{REQUEST_URI} /pma/ [OR]
        RewriteCond %{REQUEST_URI} /pma2005/ [OR]
        RewriteCond %{REQUEST_URI} /pmd/ [OR]
        RewriteCond %{REQUEST_URI} /poc.jsp/ [OR]
        RewriteCond %{REQUEST_URI} /poly592/ [OR]
        RewriteCond %{REQUEST_URI} /polycom/ [OR]
        RewriteCond %{REQUEST_URI} /polycom/IP670/ [OR]
        RewriteCond %{REQUEST_URI} /polycom550/ [OR]
        RewriteCond %{REQUEST_URI} /polycom6000/ [OR]
        RewriteCond %{REQUEST_URI} /polycom_uc/ [OR]
        RewriteCond %{REQUEST_URI} /portfolio.* [OR]
        RewriteCond %{REQUEST_URI} /pps/aastra/ [OR]
        RewriteCond %{REQUEST_URI} /pps/cisco/ [OR]
        RewriteCond %{REQUEST_URI} /privacy/ [OR]
        RewriteCond %{REQUEST_URI} /products/aastra/ [OR]
        RewriteCond %{REQUEST_URI} /products/cisco/ [OR]
        RewriteCond %{REQUEST_URI} /products/gigaset/ [OR]
        RewriteCond %{REQUEST_URI} /products/grandsteam/ [OR]
        RewriteCond %{REQUEST_URI} /products/gs/ [OR]
        RewriteCond %{REQUEST_URI} /products/polycom/ [OR]
        RewriteCond %{REQUEST_URI} /profile/register/ [OR]
        RewriteCond %{REQUEST_URI} /prov/ [OR]
        RewriteCond %{REQUEST_URI} /provision/ [OR]
        RewriteCond %{REQUEST_URI} /provisioning/ [OR]
        RewriteCond %{REQUEST_URI} /pub/ [OR]
        RewriteCond %{REQUEST_URI} /pub/god/ [OR]
        RewriteCond %{REQUEST_URI} /pub/polycom/ [OR]
        RewriteCond %{REQUEST_URI} /public/ [OR]
        RewriteCond %{REQUEST_URI} /public/_ignition/health-check/ [OR]
        RewriteCond %{REQUEST_URI} /race-to-dominate-wearable-technology/ [OR]
        RewriteCond %{REQUEST_URI} /race-to-dominate-wearable-technology/feed/ [OR]
        RewriteCond %{REQUEST_URI} /real-estate-investors/ [OR]
        RewriteCond %{REQUEST_URI} /real-estate-investors/real-estate-title-remedies/ [OR]
        RewriteCond %{REQUEST_URI} /real-estate-investors/solve-real-estate-problems/ [OR]
        RewriteCond %{REQUEST_URI} /recordings/ [OR]
        RewriteCond %{REQUEST_URI} /reit-research/ [OR]
        RewriteCond %{REQUEST_URI} /resources/.* [OR]
        RewriteCond %{REQUEST_URI} /reviewing-of-investment-plans/ [OR]
        RewriteCond %{REQUEST_URI} /reviewing-of-investment-plans/feed/ [OR]
        RewriteCond %{REQUEST_URI} /screen-shot-2013-06-20-at-1-58-38-am/ [OR]
        RewriteCond %{REQUEST_URI} /sell-house-that-needs-repairs-mckinney-tx/feed/ [OR]
        RewriteCond %{REQUEST_URI} /sgx-halts-securities-and-derivatives-markets/ [OR]
        RewriteCond %{REQUEST_URI} /sgx-seeking-to-reduce-trading-lot-size/ [OR]
        RewriteCond %{REQUEST_URI} /sgx-to-reopen-securities-market/ [OR]
        RewriteCond %{REQUEST_URI} /shares/avago-technologies-surged-to-a-new-high/ [OR]
        RewriteCond %{REQUEST_URI} /sip.cfg/ [OR]
        RewriteCond %{REQUEST_URI} /sip.conf/ [OR]
        RewriteCond %{REQUEST_URI} /sip.config/ [OR]
        RewriteCond %{REQUEST_URI} /sip.log/ [OR]
        RewriteCond %{REQUEST_URI} /sip/ [OR]
        RewriteCond %{REQUEST_URI} /sip/config/ [OR]
        RewriteCond %{REQUEST_URI} /sipAccount.cfg/ [OR]
        RewriteCond %{REQUEST_URI} /sipAccount0.cfg/ [OR]
        RewriteCond %{REQUEST_URI} /sip_config.html/ [OR]
        RewriteCond %{REQUEST_URI} /sip_data.txt/ [OR]
        RewriteCond %{REQUEST_URI} /sip_data/ [OR]
        RewriteCond %{REQUEST_URI} /sipaccount.cfg/ [OR]
        RewriteCond %{REQUEST_URI} /sipaccount/ [OR]
        RewriteCond %{REQUEST_URI} /sipconf.cfg/ [OR]
        RewriteCond %{REQUEST_URI} /sipconf.txt/ [OR]
        RewriteCond %{REQUEST_URI} /sipconfig.html/ [OR]
        RewriteCond %{REQUEST_URI} /sipconfig/configs/sip.conf/ [OR]
        RewriteCond %{REQUEST_URI} /sipura/ [OR]
        RewriteCond %{REQUEST_URI} /site/ [OR]
        RewriteCond %{REQUEST_URI} /site/wp-admin/includes/ [OR]
        RewriteCond %{REQUEST_URI} /smaller-trading-lot-size/ [OR]
        RewriteCond %{REQUEST_URI} /smaller-trading-lot-size/feed/ [OR]
        RewriteCond %{REQUEST_URI} /snmp/ [OR]
        RewriteCond %{REQUEST_URI} /snom/ [OR]
        RewriteCond %{REQUEST_URI} /solr/ [OR]
        RewriteCond %{REQUEST_URI} /spa/ [OR]
        RewriteCond %{REQUEST_URI} /spa112/ [OR]
        RewriteCond %{REQUEST_URI} /sqlmanager/ [OR]
        RewriteCond %{REQUEST_URI} /sqlweb/ [OR]
        RewriteCond %{REQUEST_URI} /starhill-global-reit-logo/ [OR]
        RewriteCond %{REQUEST_URI} /starhillglobalreit_revenuecontribution/ [OR]
        RewriteCond %{REQUEST_URI} /start-early/ [OR]
        RewriteCond %{REQUEST_URI} /start-early/feed/ [OR]
        RewriteCond %{REQUEST_URI} /starting-all-over-again/ [OR]
        RewriteCond %{REQUEST_URI} /starting-all-over-again/somedomain-journey-financial-freedom-road/ [OR]
        RewriteCond %{REQUEST_URI} /stock-investment-in-7-easy-steps/ [OR]
        RewriteCond %{REQUEST_URI} /stock-investment-in-7-easy-steps/feed/ [OR]
        RewriteCond %{REQUEST_URI} /stock-investment-in-7-easy-steps/somedomain-stairsmanpersonwalking/ [OR]
        RewriteCond %{REQUEST_URI} /succumb-to-changes-ums-holdings-limited/ [OR]
        RewriteCond %{REQUEST_URI} /succumb-to-changes-ums-holdings-limited/feed/ [OR]
        RewriteCond %{REQUEST_URI} /suntec-reit-acquiring-office-towers-in-north-sydney/ [OR]
        RewriteCond %{REQUEST_URI} /suntec-reit-acquiring-office-towers-in-north-sydney/feed/ [OR]
        RewriteCond %{REQUEST_URI} /suntec_reit_logo/ [OR]
        RewriteCond %{REQUEST_URI} /systembc/ [OR]
        RewriteCond %{REQUEST_URI} /tag/.* [OR]
        RewriteCond %{REQUEST_URI} /taking-a-good-break/ [OR]
        RewriteCond %{REQUEST_URI} /taking-a-good-break/feed/ [OR]
        RewriteCond %{REQUEST_URI} /taking-a-good-break/oai4zt0/ [OR]
        RewriteCond %{REQUEST_URI} /tech/ [OR]
        RewriteCond %{REQUEST_URI} /tech/polycom/ [OR]
        RewriteCond %{REQUEST_URI} /temp/ [OR]
        RewriteCond %{REQUEST_URI} /templates/beez5/ [OR]
        RewriteCond %{REQUEST_URI} /terms/ [OR]
        RewriteCond %{REQUEST_URI} /test/ [OR]
        RewriteCond %{REQUEST_URI} /test_404_page/ [OR]
        RewriteCond %{REQUEST_URI} /tftp/ [OR]
        RewriteCond %{REQUEST_URI} /tftpboot/ [OR]
        RewriteCond %{REQUEST_URI} /the-3-best-resources-for-stock-investing/ [OR]
        RewriteCond %{REQUEST_URI} /the-3-best-resources-for-stock-investing/somedomain-investopedia-logo/ [OR]
        RewriteCond %{REQUEST_URI} /the-importance-of-great-leaders/ [OR]
        RewriteCond %{REQUEST_URI} /the-importance-of-great-leaders/feed/ [OR]
        RewriteCond %{REQUEST_URI} /thinkphp/html/public/ [OR]
        RewriteCond %{REQUEST_URI} /thruk/cgi-bin/login.cgi?thruk/ [OR]
        RewriteCond %{REQUEST_URI} /thumb-company/ [OR]
        RewriteCond %{REQUEST_URI} /thumb-marketer-page/ [OR]
        RewriteCond %{REQUEST_URI} /thumb-masonry-image/ [OR]
        RewriteCond %{REQUEST_URI} /thumb-personal-page/ [OR]
        RewriteCond %{REQUEST_URI} /thumb-portfolio-3/ [OR]
        RewriteCond %{REQUEST_URI} /thumb-shop/ [OR]
        RewriteCond %{REQUEST_URI} /trading-country-club-membership/ [OR]
        RewriteCond %{REQUEST_URI} /trading-country-club-membership/feed/ [OR]
        RewriteCond %{REQUEST_URI} /trading-halt-due-to-power-supply-failure/ [OR]
        RewriteCond %{REQUEST_URI} /trading-update-december-2015/ [OR]
        RewriteCond %{REQUEST_URI} /trading-update-december-2015/feed/ [OR]
        RewriteCond %{REQUEST_URI} /trading-update-november-2015/ [OR]
        RewriteCond %{REQUEST_URI} /trading-update-november-2015/feed/ [OR]
        RewriteCond %{REQUEST_URI} /trading-update-november-2015/somedomain-eurusdtradeexample/ [OR]
        RewriteCond %{REQUEST_URI} /trading-update-november-2015/somedomain-technicalchart/ [OR]
        RewriteCond %{REQUEST_URI} /ums-succumb-to-changes-001/ [OR]
        RewriteCond %{REQUEST_URI} /ums-succumb-to-changes-002/ [OR]
        RewriteCond %{REQUEST_URI} /ums-succumb-to-changes-003/ [OR]
        RewriteCond %{REQUEST_URI} /ums-succumb-to-changes-004/ [OR]
        RewriteCond %{REQUEST_URI} /uncategorized/hello-world/ [OR]
        RewriteCond %{REQUEST_URI} /understanding-the-24-hours-market/ [OR]
        RewriteCond %{REQUEST_URI} /understanding-the-24-hours-market/feed/ [OR]
        RewriteCond %{REQUEST_URI} /v2/ [OR]
        RewriteCond %{REQUEST_URI} /var/lib/asterisk/ [OR]
        RewriteCond %{REQUEST_URI} /var/www/html/ [OR]
        RewriteCond %{REQUEST_URI} /vim/ [OR]
        RewriteCond %{REQUEST_URI} /vim/patior/ [OR]
        RewriteCond %{REQUEST_URI} /visa/ [OR]
        RewriteCond %{REQUEST_URI} /voice/ [OR]
        RewriteCond %{REQUEST_URI} /voice/sip/ [OR]
        RewriteCond %{REQUEST_URI} /voip/ [OR]
        RewriteCond %{REQUEST_URI} /voip/sip/ [OR]
        RewriteCond %{REQUEST_URI} /voip_config.html/ [OR]
        RewriteCond %{REQUEST_URI} /voipconfig.html/ [OR]
        RewriteCond %{REQUEST_URI} /vpn/ [OR]
        RewriteCond %{REQUEST_URI} /vtech/ [OR]
        RewriteCond %{REQUEST_URI} /webadmin/ [OR]
        RewriteCond %{REQUEST_URI} /webclient/ [OR]
        RewriteCond %{REQUEST_URI} /webdb/ [OR]
        RewriteCond %{REQUEST_URI} /webfig/ [OR]
        RewriteCond %{REQUEST_URI} /websql/ [OR]
        RewriteCond %{REQUEST_URI} /welcome-to-investor-monkey/ [OR]
        RewriteCond %{REQUEST_URI} /welcome-to-investor-monkey/feed/ [OR]
        RewriteCond %{REQUEST_URI} /what-is-passive-income/ [OR]
        RewriteCond %{REQUEST_URI} /what-is-passive-income/feed/ [OR]
        RewriteCond %{REQUEST_URI} /whoAmI/ [OR]
        RewriteCond %{REQUEST_URI} /wordpress/ [OR]
        RewriteCond %{REQUEST_URI} /wordpress/wp-admin/includes/ [OR]
        RewriteCond %{REQUEST_URI} /wordpress/wp-content/plugins/task-controller/ [OR]
        RewriteCond %{REQUEST_URI} /wordpress/wp-content/plugins/x/patior/patior/ [OR]
        RewriteCond %{REQUEST_URI} /yeastar/ [OR]
        RewriteRule ^ - [G,NC]