Jump to content

[ask]Gmn caranya Merubah ekstensi pretashops menjadi .html


gaar4 aka dj4il

Recommended Posts

Aktifkan URL rewrite Prestashop Anda
Buat terlebih dahulu sebuah file bernamat htaccess.txt (dgn notepad) lalu tempatkan di root directory website Anda
Selanjutnya masuk ke Back office >> Tools >> Generator
Pada bagian "Htaccess file generation" klik "Generate .htaccess file"

Hal ini sangat bermanfaat untuk Meningkatkan SEO website kita

Link to comment
Share on other sites

Aktifkan URL rewrite Prestashop Anda
Buat terlebih dahulu sebuah file bernama htaccess.txt (dgn notepad) lalu tempatkan di root directory website Anda
Selanjutnya masuk ke Back office >> Tools >> Generator
Pada bagian "Htaccess file generation" klik "Generate .htaccess file"

Hal ini sangat bermanfaat untuk Meningkatkan SEO website kita


Mau tanya untuk membuat filenya apakah cukup dengan membuka file notepad kemudian langsung save dgn nama htaccess.txt? tanpa diisi apa2? jd cukup file kosong? thanks..
Link to comment
Share on other sites

Aktifkan URL rewrite Prestashop Anda
Buat terlebih dahulu sebuah file bernama htaccess.txt (dgn notepad) lalu tempatkan di root directory website Anda
Selanjutnya masuk ke Back office >> Tools >> Generator
Pada bagian "Htaccess file generation" klik "Generate .htaccess file"

Hal ini sangat bermanfaat untuk Meningkatkan SEO website kita


Mau tanya untuk membuat filenya apakah cukup dengan membuka file notepad kemudian langsung save dgn nama htaccess.txt? tanpa diisi apa2? jd cukup file kosong? thanks..


ralat, bukan htaccess.txt tapi .htaccess iya bikin file kosong aja nanti waktu di klik tombol generate, diisi otomatis, buat nambah jadi ext html tinggal masukin rewrite rule yg dari link diatas itu
Link to comment
Share on other sites

jadi .htaccess ya bung dani? tp kalo dr notepad tetap saja formatnya txt. apakah caranya memang buat dulu dalam format txt baru kemudian dibuat menjadi ext. html baru kemudian ditempatkan di root directory? root directory itu public_html ya? thanks..

Link to comment
Share on other sites

jadi .htaccess ya bung dani? tp kalo dr notepad tetap saja formatnya txt. apakah caranya memang buat dulu dalam format txt baru kemudian dibuat menjadi ext. html baru kemudian ditempatkan di root directory? root directory itu public_html ya? thanks..


bukannn,, nama filenya emang .htaccess tanpa ext txt ato html. barusan aku coba bisa tuh, produk2 nya jadi ber ext html (liad attachment)

berikut isi .htaccess setelah di modif

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

# URL rewriting module activation
Options +FollowSymLinks +Indexes
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/p/$1-$2$3.jpg [L,E]
RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/p/$1-$2.jpg [L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/c/$1$2.jpg [L,E]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$3&isolang;=$1$5 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$2&isolang;=$1$4 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/category.php?id_category=$2&isolang;=$1 [QSA,L,E]
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /prestashop/supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /prestashop/manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/(.*)$ /prestashop/$2?isolang=$1 [QSA,L,E]

RewriteRule ^([^.]+)\.html$ $1.php [L]

# Catch 404 errors
ErrorDocument 404 /prestashop/404.php

Link to comment
Share on other sites

ga pake modul simply pake urlrewrite (manfaatin htaccess) detail ada di http://forums.digitalpoint.com/showthread.php?t=454787 tapi lom pernah nyoba ,.. ada manfaatnya emang ganti ext dr php ke html ?


terima kasih oms...
saya mau mengganti ext dr php ke html untuk mengurangi serangan SQLinject,cz sekarang udh marak hacking dengan SQLinject,untuk mengantisipasi hal tersebut sebaiknya mengganti ext menjadi *.html
Link to comment
Share on other sites

jadi .htaccess ya bung dani? tp kalo dr notepad tetap saja formatnya txt. apakah caranya memang buat dulu dalam format txt baru kemudian dibuat menjadi ext. html baru kemudian ditempatkan di root directory? root directory itu public_html ya? thanks..


bukannn,, nama filenya emang .htaccess tanpa ext txt ato html. barusan aku coba bisa tuh, produk2 nya jadi ber ext html (liad attachment)

berikut isi .htaccess setelah di modif

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

# URL rewriting module activation
Options +FollowSymLinks +Indexes
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/p/$1-$2$3.jpg [L,E]
RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/p/$1-$2.jpg [L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/c/$1$2.jpg [L,E]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$3&isolang;=$1$5 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$2&isolang;=$1$4 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/category.php?id_category=$2&isolang;=$1 [QSA,L,E]
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /prestashop/supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /prestashop/manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/(.*)$ /prestashop/$2?isolang=$1 [QSA,L,E]

RewriteRule ^([^.]+)\.html$ $1.php [L]

# Catch 404 errors
ErrorDocument 404 /prestashop/404.php



terima kasih banyak..
sangat membantu sekali bagi newbie seperti saya. :)
Link to comment
Share on other sites

AKhirnya setelah saya Cari pengebab Eror,udh ketemu.
berikut langkah membuat php ke bentuk ext html menggunakan .htacess seperti yg telah di replay oleh mas danni (thanks mas danni)

ne ane kasih screenshotnya gan..selanjutnya ente ikutin aje.
1.buat file .htacess di root folder web shop anda.
kemuadian copas script yg diberikan mas danni. (ada dibawah ini gan)
2.login ke website anda kemudian aktifkan friendly url.
bisa lihat disini untuk screenshoutnya http://i49.tinypic.com/rw8513.jpg


berikut isi .htaccess setelah di modif

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

# URL rewriting module activation
Options +FollowSymLinks +Indexes
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/p/$1-$2$3.jpg [L,E]
RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/p/$1-$2.jpg [L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /prestashop/img/c/$1$2.jpg [L,E]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$3&isolang;=$1$5 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$2&isolang;=$1$4 [L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/category.php?id_category=$2&isolang;=$1 [QSA,L,E]
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$2$4 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /prestashop/product.php?id_product=$1$3 [L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /prestashop/cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /prestashop/supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /prestashop/manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/(.*)$ /prestashop/$2?isolang=$1 [QSA,L,E]

RewriteRule ^([^.]+)\.html$ $1.php [L]

# Catch 404 errors
ErrorDocument 404 /prestashop/404.php



3. setelah mengaktifkan friendly url kita lanjut ke-tab menu tools ==> Generators ==> Generate .htaccess files

kl dh berhasil silahkan anda cek.

moga bermanfaat & maju terus preta indonesia :)
Link to comment
Share on other sites

Stepnya kudu direvisi,,

1. buat .htaccess & robots.txt
2. aktifkan friendly url (di tools - appearance)
3. generate .htaccess ma robots.txt (dari Generators > Generate .htaccess files) -- INGAT kl klik tombol ini isi file sebelumnya jadi ketimpa!
4. edit .htaccess (entah di file manager control panel ato apa) trus sisipin 2 baris ini (posisinya liat kode diatas)

Options +FollowSymLinks +Indexes

RewriteRule ^([^.]+)\.html$ $1.php [L]

5. save & test

kalo maen copas konfig diatas bisa ga jalan itu kan pathnya ke folder /prestashop/ bisa jadi beda ama yg lagi dipake sekarang :P

Link to comment
Share on other sites

Hehehe perkembangannya jadi begini :)
Saya ulang kembali :

Buat terlebih dahulu sebuah file bernama htaccess.txt (dgn notepad) lalu tempatkan di root directory website Anda
Setelah di webserver ... rename file tersebut menjadi .htaccess
Selanjutnya masuk ke Back office >> Tools >> Generator
Pada bagian “Htaccess file generation” klik “Generate .htaccess file”

Kalu masih bingung gimana buat file htaccess, silahkan download blank .htaccess file yang saya attach lalu extract dan upload ke root directory prestashopnya

CATATAN :
Melalui cPanel file manager atau FTP, kita dapat langsung membuat file .htaccess (extension DOT = hidden File)
Qlo dibuat di komputer kita yg ber OS Windows, maka yg bisa dibuat htaccess.txt selanjutnya dirubah namanya menjadi .htaccess menggunakan fasilitas rename file di cPanel file manager atau ftp

htaccess.zip

Link to comment
Share on other sites

  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...