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:


You may also like...

22 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:

    Coba pakai ini di file .htacess:

  4. smadav says:

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

    point 2; 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


    kasusnya :
    bagaimana jika seseorang menginput langsung “” otomatis langsung redirect ke : “”

    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:

    lihat eror log pada webserver
    biasanya bermasalah dengan real path, path server
    fix-kan bagian yg error

    Dicoba saja, barangkali hostingannya perlu pakai:
    RewriteBase /

    Jadi htaccess nya:

  11. arief says:

    kang Jawaad,
    gimana kalo misalnya
    mau seperti

    dan kalo misalnya
    mau seperti

    Terimakasih ya… πŸ™‚

  12. Jawaad says:

    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?

  13. dinar says:

    nanya gan gimana caranya diganti menjadi saya pake kode di atas hasilnya error terus

  14. 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.

  15. 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.

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

    Also visit my page :: shemale belgium escort

  17. 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!

  18. 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

  19. 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

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

Leave a Reply

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