This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara -

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara -

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara -

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara -

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara -

Monday, March 27, 2017

How To Set Up mod_rewrite for Apache on Ubuntu 14.04


In this tutorial, we will activate and learn how to manage URL rewrites using Apache2's mod_rewrite module. This tool allows us to rewrite URLs in a cleaner fashion, translating human-readable paths into code-friendly query strings.
This guide is split into two halves: the first sets up a sample web application and the second explains commonly-used rewrite rules.


To follow this tutorial, you will need:
  • One fresh Ubuntu 14.04 Droplet
  • A sudo non-root user, which you can set up by following steps 2 and 3 of this tutorial

Step 1 — Installing Apache

In this step, we will use a built-in package installer called apt-get. It simplifies management drastically and facilitates a clean installation.
First, update the system's package index. This will ensure that old or outdated packages do not interfere with the installation.
  • sudo apt-get update
Apache2 is the aforementioned HTTP server and the world's most commonly used. To install it, run the following:
  • sudo apt-get install apache2
For information on the differences between Nginx and Apache2, the two most popular open-source web servers, see this article.

Step 2 — Enabling mod_rewrite

Now, we need to activate mod_rewrite.
  • sudo a2enmod rewrite
This will activate the module or alert you that the module is already in effect. To put these changes into effect, restart Apache.
  • sudo service apache2 restart

Step 3 — Setting Up .htaccess

In this section, we will setup a .htaccess file for simpler rewrite rule management.
A .htaccess file allows us to modify our rewrite rules without accessing server configuration files. For this reason, .htaccess is critical to your web application's security. The period that precedes the filename ensures that the file is hidden.
We will need to set up and secure a few more settings before we can begin.
First, allow changes in the .htaccess file. Open the default Apache configuration file using nano or your favorite text editor.
  • sudo nano /etc/apache2/sites-enabled/000-default.conf
Inside that file, you will find the <VirtualHost *:80> block on line 1. Inside of that block, add the following block:
<Directory /var/www/html> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>
Your file should now match the following. Make sure that all blocks are properly indented.
<VirtualHost *:80> <Directory /var/www/html> . . . </Directory> . . . </VirtualHost>
To put these changes into effect, restart Apache.
  • sudo service apache2 restart
Now, create the .htaccess file.
  • sudo nano /var/www/html/.htaccess
Add this first line at the top of the new file to activate the RewriteEngine.
RewriteEngine on
Save and exit the file.
To ensure that other users may only read your .htaccess, run the following command to update permissions.
  • sudo chmod 644 /var/www/html/.htaccess
You now have an operational .htaccess file, to govern your web application's routing rules.

Step 4 — Setting Up Files

In this section, we will set up a basic URL rewrite, which converts pretty URLs into actual paths to code. Specifically, we will allow users to access
We will begin by creating a file named about.html.
  • sudo nano /var/www/html/about.html
Copy the following code into the HTML page.
<html> <head> <title>About Us</title> </head> <body> <h1>About Us</h1> </body> </html>
You may access your web application at your_server_ip/about.html or Now notice that only about.html is accessible; if you try to access your_server_ip/about, you will get a Not Found error. We would like users to access about instead. Our rewrite rules will allow this very functionality.
Open up the .htaccess file.
  • sudo nano /var/www/html/.htaccess
After the first line, add the following.
RewriteRule ^about$ about.html [NC]
Your file should now be identical to the following.
RewriteEngine on RewriteRule ^about$ about.html [NC]
Congratulations. You can now access in your browser!
This is a good simple example that shows the general syntax that all Rewrite Rules follow.
^about$ is the string that gets matched from the URL. That is, it's what the viewer types in her browser. Our example uses a few metacharacters.
  • ^ indicates the start of the URL, after is stripped away.
  • $ indicates the end of the URL
  • about matches the string "about"
about.html is the actual path that the user accesses; that is, Apache will still serve the about.html file.
[NC] is a flag that ignores capitalization in the URL.
With the rule shown above, the following URLs will point to about.html:
The following will not:

Common Patterns

In this section, we will show some commonly-used directives.
Your web application is now running and is governed by a protected .htaccess file. The simplest example was included above. We will explore an additional two examples in this section.
You can set up example files at the result paths if you would like, but this tutorial does not include creating the HTML and PHP files; just the rules for rewriting.

Example 1: Simplifying Query Strings with RewriteRule

All RewriteRules abide by the following format:
RewriteRule pattern substitution [flags]
  • RewriteRule: specifies the directive RewriteRule
  • pattern: a regular expression that matches the desired string
  • substitution: path to the actual URL
  • flags: optional parameters that can modify the rule
Web applications often make use of query strings, which are appended to a URL using the ? question mark and delimited using the & ampersand. These are ignored when matching rewrite rules. However, sometimes query strings may be required for passing data between pages. For example, a search result page written in PHP may utilize something akin to the following:
In this example, we would like to simplify this to become:
Example 1A: Simple Replacement
Using a rewrite rule, we could use the following:
RewriteRule ^shirt/summer$ results.php?item=shirt&season=summer
The above is fairly self-explanatory, as it actually maps shirt/summer to results.php?item=shirt&season=summer. This achieves our desired effect.
Example 1B: Matching Options
However, we would like to generalize this to include all seasons. So, we will do the following:
  • Specify a series of options using the | boolean, meaning "OR"
  • Group the match using (), then reference the group using $1, with 1 for the first matched group
The Rewrite Rule now becomes:
RewriteRule ^shirt/(summer|winter|fall|spring) results.php?item=shirt&season=$1
The rule shown above matches a URL of shirt/ followed by a specified season. That season is grouped using () and then referenced with the $1 in the subsequent path. This means that, for example, that:
This also achieves the desired effect.
Example 1C: Matching Character Sets
However, we would also like to specify any type of item, not just URLs at /shirt. So, we will do the following:
  • Write a regular expression that matches all alphanumeric characters. The bracket expression [] matches any character inside of it, and the + matches any number of characters specified in the brackets
  • Group the match, and reference it with $2 as the second variable in the file
RewriteRule ^([A-Za-z0-9]+)/(summer|winter|fall|spring) results.php?item=$1&season=$2
The above will convert, for example:
Example 1D: Passing Query Strings
This section doesn't introduce any new concepts but addresses an issue that may come up. Using the above example, say we would like to redirect but will pass an additional query string ?page=2. We would like the following:
to map to:
If you were to attempt to access the above URL with our current settings, you would find that the query string page=2 got lost. This is easily fixed using an additional QSA flag. Modify the rewrite rule to match the following, and the desired behavior will be achieved.
RewriteRule ^([A-Za-z0-9]+)/(summer|winter|fall|spring) results.php?item=$1&season=$2 [QSA]

Example 2: Adding Conditions with Logic

RewriteCond lets us add conditions to our rewrite rules. All RewriteConds abide by the following format:
RewriteCond TestString Condition [Flags]
  • RewriteCond: specifies the RewriteCond directive
  • TestString: the string to test against
  • Condition: the pattern to match
  • Flags: optional parameters that may modify the condition
If a RewriteCond evaluates to true, the RewriteRule immediately following will be considered.
Example 2A: Default Page
In an imaginary administration panel, we may want to direct all malformed URLs back to the home page, instead of greeting users with a 404. Using a condition, we can check to see if the requested file exists.
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^admin/(.*)$ /admin/home
This will redirect something like /admin/blargh to /admin/home.
With the above:
  • %{REQUEST_FILENAME} is the string to check
  • !-f uses the ! not operator on the filename
  • RewriteRule redirects all requests back to /admin/home
Note that a more syntactically and technically correct approach would be to define the 404 ErrorDocument.
ErrorDocument 404 /error.html
Example 2B: IP Access Restriction
Although this can also achieved using other methods, a RewriteCond can be used to restrict access to one IP or a collection of IP addresses.
This example blocks traffic from everywhere except
RewriteCond %{REMOTE_ADDR} !^(12\.34\.56\.789)$ RewriteRule (.*) - [F,L]
This example is simply the negation of Example 3 from the old mod_rewrite article. The entire statement reads "if the address is not, do not allow access."
In short:
  • %{REMOTE_ADDR} is the address string
  • !^(12\.34\.56\.789)$ escapes all . periods with a \ backslash and negates the IP address using !
  • The F flag forbids access, and the L flag indicates that this is the last rule to run, if executed
If you'd rather block, use this instead:
RewriteCond %{REMOTE_ADDR} ^(12\.34\.56\.789)$ RewriteRule (.*) - [F,L]
You can find more rewrite rules, and how to prevent hot linking, in the original article's part 1 and part 2.


mod_rewrite can be used effectively to ensure human-readable URLs. The .htaccess file itself has many more uses than simply this module, however, and it should be noted that many other Apache modules may be installed to extend its functionality.
There are other resources that detail the capabilities of mod_rewrite:
mod_rewrite is a critical module for web application security, but can sometimes end up in redirect loops or ubiquitous, ambiguous 500 forbidden errors. For tips on debugging .htaccess, see this StackOverflow post.
Rewrite rules are written with regular expressions. To become an expert, reference this tutorial all about regular expressions.
For quick analysis of your regular expression patterns, here is an online debugger that can provide immediate feedback and live interpretations of your regular expression patterns.

Wednesday, December 28, 2016

Define Date and Numeric Formats for Mail Merge Fields

Format Merge Fields Using Mail Merge Switches

To format a merge field:
  1. In the template document, while the merge field is selected, do the following to display the field code:
    • Press Shift + F9 on Windows.
    • Press Fn + Shift + F9 on Mac.
  2. Remove "\*MERGEFORMAT" from the field code.
  3. Enter the switch in the field code. For example:
    1. Original field code: {MERGEFIELD myObject.myField  \*MERGEFORMAT} 
    2. Updated field code: {MERGEFIELD myObject.myField \# ###,###,###,#00.0}
  4. Update the field:
    • Press F9 on Windows.
    • Press Fn + F9 on Mac.
To format a numeric merge field, use the \# switches. For example, to display a currency field as "$125.23", the merge field should be defined as {MERGEFIELD myObject.myField \# $#,##0.00}.
To format a date merge field, use the \@ switches. For example, to display a date field as "03/30/2010", the merge field should be defined as { MERGEFIELD myObject.myField \@ MM/dd/yyyy}

Date and Numeric Format Examples

The following table includes formatting examples for the date and number types mail merge fields.
Field Format Merge Field Syntax
To use standard date formatting: 10/26/2012
{MERGEFIELD Invoice.InvoiceDate}
To use simple date formatting: 20121026
{MERGEFIELD Invoice.InvoiceDate \@ yyyyMMdd}
To use text date formatting: OCT 2012
{MERGEFIELD Invoice.InvoiceDate \@ MMM yyyy}
To use standard percentage formatting: 0.08
{MERGEFIELD TaxItem.TaxRate}
To use percentage symbol formatting: 8%
{MERGEFIELD TaxItem.TaxRate \# ##%}
To specify a label for a quantity: 3.0000kg
{MERGEFIELD Usage.Quantity \# #,##kg0.0000}
To specify a symbol for a currency: €12,13.8
{MERGEFIELD Invoice.Total \# €#,# 0.0}

Monday, August 1, 2016

Blokir Mac Address

1. Masuk ke winbox
2. Jika sudah,, sekarang masuk ke IP => Firewall => Fillter rules => tambah baru.
3. Pada menu general chain = forward out.interfacenya misal saya menggunakan eth1.
 4. Pada menu advanced, pada bagian Src. MAC Address diisi mac address yang akan diblock.

 5. Dan pada menu Action kita pilih Drop, jika sudah apply => Ok

Jadi mac address yang tadi didrop tidak bisa mengakses internet yang melewati
MikroTik kita karena pada out.interfacesnya kita menggunakan eth1 yang terhubung keinternet.

>>>>>>>>>>>>>>>SEMOGA BERMANFAAT <<<<<<<<<<<<<<<<<

Friday, July 29, 2016

Kutipan Tulisan Bapak Anies Baswedan

"Ini tulisan Anies Baswedan yg saya tdk bosan2 membacanya ❤ :

Anak anak yang dididik dalam keluarga yang penuh kesantunan, etika tata krama, sikap kesederhanaan akan tumbuh menjadi anak anak yang tangguh, disenangi, dan disegani banyak orang...

Mereka tahu aturan makan table manner di restoran mewah. Tapi tidak canggung makan di warteg kaki lima...

Mereka sanggup beli barang-barang mewah. Tapi tahu mana yang keinginan dan kebutuhan...

Mereka biasa pergi naik pesawat antar kota. Tapi santai saja saat harus naik angkot kemana-mana...

Mereka berbicara formal saat bertemu orang berpendidikan. Tapi mampu berbicara santai bertemu orang jalanan...

Mereka berbicara visioner saat bertemu rekan kerja. Tapi mampu bercanda lepas bertemu teman sekolah...

Mereka tidak norak dan minder saat bertemu orang kaya. Tapi juga tidak merendahkan orang yg lebih miskin darinya...

Mereka mampu membeli barang-barang bergengsi. Tapi sadar kalau yang membuat dirinya bergengsi adalah kualitas, kapasitas
dirinya, bukan dari barang yang dikenakan...

Mereka punya.. Tapi tidak teriak kemana -mana. Kerendahan hati yang membuat orang lain menghargai dan menghormati dirinya...

Jangan didik anak dari kecil dengan penuh kemanjaan, apalagi sampai melupakan kesantunan, etika tata krama...

Hal hal sederhana tentang kesantunan seperti :
🔹Pamit saat pergi dari rumah
🔹Permisi saat masuk ke rumah temen (karena ternyata banyak orang masuk ke rumah orang tidak punya sopan santun, tidak menyapa orang orang yang ada di rumah itu),
🔹Saat masuk atau pulang kerja memberi salam kepada rekan, terlebih pimpinan
🔹Kembalikan pinjaman uang sekecil apapun,
🔹Berani minta maaf saat ada kesalahan
🔹Tahu berterima kasih jika dibantu sekecil apapun...

Kelihatannya sederhana, tapi orang yang tidak punya attitude itu tidak akan mampu melakukannya...

Bersyukurlah, bukan karena kita terlahir di keluarga yang kaya atau cukup...

Bersyukurlah kalau kita terlahir di keluarga yang mengajarkan kita kesantunan, etika, tata krama dan kesederhanaan....."


Friday, May 13, 2016

Mengaktifkan MS Power Point pada Wine

Jika anda telah berhasil menginstall MS Power Point di Wine biasanya muncul masalah. MS Power Point tidak bisa langsung dibuka. Hal ini karena riched20nya belum aktif.
Cara mengaktifkannya:
  1. Buka winetrick
  2. Pilih "Select the default wineprefix"
  3. Pilih "Run winecfg"
  4. Pada tab Libraries, pilih "riched20 (native)" pada menu pilihan "New override for library"
  5. Klik "Add"
  6. Klik "Ok"
  7. MS Point siap digunakan

Thursday, April 28, 2016


Sampai sekarang, masih ada satu makna kata ditulis dengan dua cara. Yakni kata yang dimaksud bermakna “gedung”; ada yang menulis GRAHA dan ada pula GRHA. Mana yang benar ?
Setahu saya, pada masa Gus Dur (alm) menjadi Presiden, ada gagasan untuk menggubah nama BINA GRAHA menjadi BINA GRHA. Sayang belum terlaksana. Berbeda tipis dalam penulisan, namun maknanya sangat berbeda.
Empatbelas (14) tahun yang lalu, saya menulis di majalah Gatra perihal ini dengan judul Gara-gara Bina Graha (saya kutip sepenuhnya pada akhir tulisan ini). Karena penasaran, saya buka lagi beberapa kamus dan saya kutip sebagai berikut :

Suparlan (1994) : Kamus Kawi-Indonesia
Penerbit : Kanisius
grah = gerah
graha = sakit
grahan = kesakitan

Wojowasito (1977) : Kamus Kawi-Indonesia
Penerbit : cv Pengarang
graha = 1. bintang; 2. pegang, capai, tersesat, salah raba; 3. buaya
grha = rumah
grhadika = rumah bagus
grhastha = kepala keluarga
grhaja = lahir di rumah

Prawiroatmodjo (1987) : Bausastra Jawa Indonesia
Penerbit : Gunug Agung
grah = gering
graha = istri/suami, bintang, buaya
graja = saudara

Winter & Ranggawarsita (1987) : Kamus Kawi-Jawa
Penerbit : Gadjah Mada University Press
grah = sakit, geludhug, panas
graha = 1. griya, wengku, enggen, sakit, garwa, estri, semah, jodho, selir,
pengrembe; 2. sakit
greha = griya

Departemen Pendidikan Nasional ( 2008) : Kamus Besar Bahasa Indonesia, ed.4
Penerbit : PT Grmedia Pustaka Utama
graha = 1. menangkap; 2. buaya
graha bergeser menjadi gerha
gerha = 1. istri, permaisuri (ark, tidak lazim)
gerha = bangunan, kantor, tempat tinggal, geria

Akhirnya saya berpendapat bahwa penulisan kata Skt yang bermakna gedung, yang benar adalah GRHA bukan GRAHA. Laman “gerha” dalam KBBI dan “greha” dalam Winter & Ranggawarsita adalah senada dengan “grha” dalam bahasa Skt.

Gara-gara Bina Graha

Menurut Prawiroatmodjo (1981) graha artinya istri (suami), bintang, buaya. Wojowasito (1977) mengartikan: pegang, raba, capai/jangkau. Grha artinya rumah. Menurut kamus Kawi-Jawa (Ranggawarsita & Winter, 1987), graha : 1. griya/rumah, wengku/bingkai, enggen/tempat, garwa (suami atau istri), selir/gundhik, pengrembe (tanah milik raja); 2. sakit.
Tak mengherankan terjadinya kekalutan dengan multikrisis di negara kita, karena segala urusan memang dilakukan di Bina Graha. Yang dibina itu para suami/istri, bintang (di pundak), dan para buaya (darat), pegang-pegang dan raba-raba. Coba seandainya bangunan itu diberi nama Bina Grha, maka selama enam pelita yang sudah dilewati, tetunya tak ada lagi yang tuna-wisma ---- [GATRA, 12 Agustus 2000].

Suwardjoko Warpani
Program Studi Perencanaan Wilayah dan Kota - ITSB

Mengenal Akreditasi Rumah Sakit

Semenjak diberlakukannya Undang-undang Rumah Sakit No.44 tahun 2009, dengung akreditas mulai banyak terdengar di seluruh Indonesia… Namun, sampai hari ini masih banyak orang bertanya-tanya apa itu akreditasi, dan apa manfaatnya.
Definisi Depkes
            Akreditasi Rumah Sakit adalah suatu pengakuan tertulis yang diberikan oleh pemerintah pada rumah sakit karena telah memenuhi standar yang ditentukan .
Dalam pasal 40 Undang-undang RS No.44 tahun 2009, kewajiban menjalani proses akreditasi disebutkan dengan eksplisit:
(1)     Dalam upaya peningkatan mutu pelayanan Rumah Sakit wajib dilakukan akreditasi secara berkala menimal 3 (tiga) tahun sekali.
 (2)     Akreditasi Rumah Sakit sebagaimana dimaksud pada ayat (1) dilakukan oleh suatu lembaga independen baik dari dalam maupun dari luar negeri berdasarkan standar akreditasi yang berlaku.
 (3)     Lembaga independen sebagaimana dimaksud pada ayat (2) ditetapkan oleh Menteri.
 (4)     Ketentuan lebih lanjut mengenai akreditasi Rumah Sakit sebagaimana dimaksud pada ayat (1), dan ayat (2) diatur dengan Peraturan Menteri.
Tahapan Akreditasi
Akreditasi terdiri atas tiga tahap,yaitu:
 Tahap I, yang dinilai adalah 5 pelayanan dasar yang meliputi:
 1. Adm & Manajemen
 2. Pelayanan Medis
 3. Pelayanan Gawat Darurat
 4. Pelayanan Keperawatan
 5. Rekam Medis

Tahap II, pada tahap ini selain kelima pelayanan dasar di atas, juga meliputi 7 pelayanan lain:
1.      Pelayanan Farmasi
2.      Pelayanan K3
3.      Pelayanan Radiologi
4.      Pelayanan Laboratorium
5.      Pelayanan Kamar Operasi
6.      Pengendalian Infeksi
7.      Pelayanan Perinatal Risiko tinggi

Jadi, pada tahap II ada 12 pelayanan yang dinilai.
Tahap III, pada tahap ini keseluruhan yang dinilai ada 16 pelayanan. Selain 12 pelayanan yang telah disebutkan sebelumnya, juga meliputi 4 dari beberapa pelayanan berikut:
·         Pelayanan Anestesi & Reanimasi
·         Pelayanan Rehabilitasi Medis
·         Pelayanan Gizi
·         Pelayanan Intensif Pelayanan Sterilisasi Sentral
·         Pemeliharaan Sarana
·         Pelayanan Lain:
·         AsKes, JPKM, Bank Darah, klinik VCT

Status Akreditasi
  1.  Tidak Terakreditasi
  2.  Akreditasi Bersyarat: nilai total dari penilaian surveyor  > 65 % - <75%, tdk ada ≤ 60%,  1 tahun dinilai lagi.
  3.  Akreditasi Penuh :  nilai total dari penilaian surveyor  ≥ 75 %, tdk ada ≤ 60%, 3 tahun masa berlaku
  4.  Akreditasi Istimewa : 5 tahun masa berlaku, didapat setelah 3 Xberturut – turut akreditasi penuh.

Manfaat Akreditasi
Banyak orang bertanya-tanya apa manfaat dari akreditasi, bahkan cenderung sinis dengan kemanfaatannya. Penulis mencoba mengumpulkan berbagai manfaat dari rumah sakit-rumah sakit yang telah menjalani proses akreditasi, a.l:
  1.  Peningkatan Pelayanan (diukur dengan clinical indicator)
  2. Peningkatan dalam proses Administrasi & Perencanaan pengembangan RS
  3. Peningkatan Koordinasi dalam Asuhan terhadap Pasien
  4. Peningkatan Koordinasi Pelayanan
  5. Peningkatan Komunikasi Antara Staff
  6. Peningkatan Sistem & Prosedur
  7. Lingkungan Yang Lebih Aman
  8. Minimalisasi Risiko
  9. Penggunaan Sumber Daya Lebih Efisien
  10. Kerjasama Organisasi Yang Lebih Baik
  11. Penurunan Keluhan Pasien & Staf
  12. Peningkatan Kesadaran Staf Akan Tanggung Jawabnya
  13. Peningkatan Moril Dan Motivasi
  14. Re-energized Organization
  15. Bagi RS pemerintah yang berencana untuk mengelola dana secara mandiri, BLU adalah jawabannya. Dan, salah satu syarat BLU adalah akreditasi.