Membuat alamat link URL menjadi cantik

Rewrite URL adalah salah satu dari tenik SEO.
Berikut contoh simple pembuatan URL cantik menggunakan .htaccess

simpan file pada root folder project Anda dengan nama .htaccess

lalu pada file index.php Anda, mainkan aturan URL-nya.

contoh isi file index.php:

Semoga membantu :mrgreen:

Share

You may also like...

29 Responses

  1. leo says:

    thanks atas tip htaccess nya mas/mbak. mau coba2 ah

  2. Suta says:

    Misalkan kita tulis link url
    1) http://test/halo/ atau
    2) http://test/halo

    bagaimana cara membuat jika user mengetikkan seperti point 2 diatas agas selalu terdirect ke link pada point 1. Tks.

  3. Jawaad says:

    @Suta,
    Coba pakai ini di file .htacess:

  4. smadav says:

    Boss!! saya mo nanya, ini apabila saya ketik url
    point 1;
    http://alamatsitus.com/namasaya/ kemudian enter “muncul pesan dari apache server bahwasanya alamat tidak ditemukan – 404 not found – dan halaman situs pun hilang”.

    point 2;
    http://alamatsitus.com/namasaya/ kemudian enter “muncul pesan yang mungkin si admin web yang ngenulis – 404 not found – tanpa menghilangkan halaman situs.”

    apa pesan diatas menggunakan fungsi .htaccess? apabila iya, bagaimana sintak / penulisannya. atas jawabannya saya ucapkan terimakasih 😀

  5. Jawaad says:

    @smadav, halo,.. Anda bisa gunakan code htacess seperti ini:

    dan dapat di custome sesuai keinginan Anda.

  6. smadav says:

    Thank mas 😀

  7. mau tanya mas, saya sudah buat 3 halaman

    1.http://www.toserbavirtual.com/a/b/disini.php
    2.http://www.toserbavirtual.com/a/b/disana.php
    3.http://www.toserbavirtual.com/a/b/disitu.php

    kasusnya :
    bagaimana jika seseorang menginput langsung “http://www.toserbavirtual.com/a/b/” otomatis langsung redirect ke : “http://www.toserbavirtual.com/a/b/disini.php”

    terima kasih sebelumnya, berjam-jam saya cari di google ga ketemu 😀

  8. Jawaad says:

    @toserbavirtual, halo… apakah a/b adalah folder dalam disk? atau semuanya di control oleh index.php seperti yg saya berikan contoh diatas?

    jika a dan b tersebut adalah folder disk secara fisik ada di system www/htdocs/public_html Anda, silahkan dengan cara membuat file index.php di folder tersebut.

    Lalu isikan kode redirect berikut:

    Jika menggunakan sistem index.php seperti diatas, bagaimana contoh Anda memecahnya? apakah dengan $do[0] $do[1] dst? atau bagaimana?

  9. ahmad says:

    500 internal error
    knp tuh bang?

  10. Jawaad says:

    @ahmad,
    lihat eror log pada webserver
    biasanya bermasalah dengan real path, path server
    fix-kan bagian yg error
    http://www.nusansifor.com/2009/11/server-internal-error-500/

    Dicoba saja, barangkali hostingannya perlu pakai:
    RewriteBase /

    Jadi htaccess nya:

  11. Jawaad says:

    @Arief,
    bisa dicoba begini mas:

    • Jawaad says:

      Bisa dicoba seperti ini:

      Tapi sebenernya tidak disarankan, karena ini artinya hanya untuk insert.php saja, mengapa tidak untuk link lainnya?

  12. dinar says:

    nanya gan gimana caranya http://saya.shop/test/client.php diganti menjadi http://saya.shop/test/home saya pake kode di atas hasilnya error terus

  13. singles says:

    Hookup Girls Utilizes Free Issues? An Excellent Horizontal Gain!

    Free of charge hookup females singles on the internet is
    the best solution if you’re tired of likely
    to night clubs and groups just to be ignored, as well as even worse, laughed at.
    I know what it’s like because I’ve been there.
    I found myself one and needy during the day time — I needed
    a fresh lover — however i continued trying because I had not any other
    choice. If you’re one particular person who would like to hookup with alluring
    girls without likely to those locations in which the ladies are
    on your own, this report might just alter your existence.
    It would describe why courting on-line is the greatest option if you’re a
    male who is shy to approach a lovely lady within a nightclub or club.

  14. singles says:

    Hookup Women Utilizes Free Matters? An Excellent Horizontal Reward!

    Free of charge hookup females singles online is the
    solution if you’re tired with planning to bars and groups simply
    to be prevented, or perhaps even worse, laughed at.
    I know what it’s like because I’ve been there. I had been solitary and distressed
    in the time — I required a brand new spouse — but I kept
    on seeking because I needed hardly any other option. If you’re a single guy who
    would like to hookup with sexy ladies without planning to those spots where ladies are by yourself, than the write-up may
    just improve your lifestyle. It would describe why courting on-line is the ideal alternative
    if you’re a men who may be shy to strategy a beautiful lady in a nightclub or team.

  15. Koko Agency – Finest choice of escorts around London.

    Also visit my page :: shemale belgium escort

  16. Hola! I’ve been reading your site for a while now and finally got the courage
    to go ahead and give you a shout out from Lubbock Tx!
    Just wanted to say keep up the good work!

  17. wqq says:

    When I originally commented I clicked the -Notify me when new comments are added- checkbox and already each time a comment is added I receive four emails with similar comment. Perhaps there is however you possibly can eliminate me from that service? Thanks! [pii_email_37f47c404649338129d6] errors

  18. asas says:

    Wow, superb weblog structure! How long have you been blogging for? you make blogging glance easy. The total look of your web site is excellent, neatly as the content material! White Runtz

  19. You created some decent points there. I looked online for that issue and located most individuals is going along with using your website.

  20. opiyaw says:

    Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. product display box

  21. dasal says:

    Do you have a spam issue on this site; I also am a blogger, and I was curious about your situation; we have created some nice methods and we are looking to exchange solutions with others, be sure to shoot me an email if interested. situs pkv games

  22. hitechwork says:

    Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking.

  23. vfmseo says:

    Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info.

  24. Thank you for taking the time to publish this information very useful!

  25. sameer says:

    Hi there, just became aware of your blog through Google, and found that it’s truly informative. I’ll be grateful if you continue this in future. Lots of people will benefit from your writing. Cheers! onohostinglow price hosting

  26. hookup apps says:

    Hookup Ladies Uses Free Matters? A Fantastic Horizontal Gain!

    Cost-free hookup girls hookup apps on the internet
    is the perfect solution if you’re sick and tired
    of likely to pubs and organizations merely to be ignored, or perhaps
    even worse, laughed at. I know what it’s like because I’ve been there.
    I was solitary and desperate back into the working day — I essential a whole
    new companion — nevertheless i continued seeking because I had not one other option. If you’re just one man who wishes to hookup with hot women without
    gonna those spots where the females are by yourself, this
    write-up may just change your life. It will explain why
    courting on the internet is the perfect substitute if you’re a
    male that is too shy to strategy a beautiful female within a nightclub or membership.

Leave a Reply to toserbavirtual Cancel reply

Your email address will not be published. Required fields are marked *