Skip to main content

[ask] ilangin kata index.php pada url gak bisa2 :((

August 11, 2009 by gedoyman

gedoyman's picture

Bos, cara ilangin index.php pada url giman? Gw uda baca user guidenya tapi gak bisa2 :((. Misalnya url yg sekarang http://localhost/sukhoi/index.php/user/news

gw pengen rubah jadi
http://localhost/sukhoi/user/news

makasih sebelumnya :D.... Hidup CodeIgniter :p

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

[ask] ilangin kata index.php pada url gak bisa2 :((

September 15, 2009 by hd, 1 year 35 weeks ago
Comment: 5643

hd's picture

1. Pastikan bahwa mod_rewrite pada apache udah diload (aktif).
Lihat bagian berikut di httpd.conf :

LoadModule rewrite_module modules/mod_rewrite.so

2. Untuk bisa menggunakan .htaccess, lihat pada konfigurasi httpd.conf di bagian :

<Directory "C:/..../htdocs">
........
AllowOverride All
........
</Directory>

Pastikan bahwa AllowOverride itu "All".

3. Kemudian dihilangkan index.php pada config.php :

$config['index_page'] = "";

Semoga berhasil.

htaccess n confignya

August 22, 2009 by dhaye, 1 year 38 weeks ago
Comment: 5635

dhaye's picture

saya coba yah...
udah bener dengan htaccess seperti kata mas bemzinside, kita harus membuat file .htaccess...
slnya didalam CI yg pertama diload adalah controller, ex : http://localhost/folderweb/index.php/controller/sub_controller/...
sehingga apabila ada folder lain berada dalam folderweb, memerlukan .htaccess untuk meloadnya...
trus... untuk menghilangkan index.php setelah membuat htaccess kita juga mengubah pada file config.php pada system/application/config/config.php... seperti ini :

$config['base_url'] = "http://localhost/folderweb/";
$config['index_page'] = ""; // index.php nya di hapus...
lalu save...
yh cuma itu aja...semoga membantu... ^_^

htaccess nya

August 16, 2009 by bemzinside, 1 year 39 weeks ago
Comment: 5628

bemzinside's picture

htaccess nya dirubah

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php?$1 [L] 

Ubah htaccess

August 28, 2009 by chooey, 1 year 37 weeks ago
Comment: 5638

chooey's picture

Bener banget htaccess-nya, coba pake ini :

RewriteEngine On
RewriteBase /Nama Folder Root(FolderWeb)
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

htaccess

August 12, 2009 by eien, 1 year 39 weeks ago
Comment: 5623

eien's picture

klo untuk kasus webserver sih biasanya diakalin di file .htaccess-nya gak masalah, tapi untuk kasus localhost, menurut pengalaman terakhir dia ga mau nurut, entah emang gak bisa atau saya-nya yang gak bisa hehehe, klo untuk ditaro di webserver sih saya bisa bantu, klo localhost mungkin yang lain ada pengalaman

emang ada pengaruhnya ya bos

August 13, 2009 by gedoyman, 1 year 39 weeks ago
Comment: 5624

gedoyman's picture

emang ada pengaruhnya ya bos antara pake localhost dengan 127.0.0.1?

-

August 13, 2009 by eien, 1 year 39 weeks ago
Comment: 5625

eien's picture

sori, yang gua maksud web server tuh hosting server, bukan di mesin lokal, nti gua coba cari2, klo ketemu ya gua tulis disini.

menghilangkan index.php, kasus sdkt lain

August 16, 2009 by tegarz, 1 year 39 weeks ago
Comment: 5629

tegarz's picture

ada kasus lain menghilangkan index.php yg mirip kasus ini, yaitu pada kasus permalink WordPress.
berdasarkan pengalaman saya, kalau mesin localhost sdh pake XAMPP 1.7.0 ke atas, fungsi mod-rewrite dari .htaccess sdh bs digunakan (langsung aktif)

BLS:

September 9, 2009 by syabac, 1 year 36 weeks ago
Comment: 5640

syabac's picture

misal rewrite module-nya kaga aktif, bisa di diseting dari error document,
jadi begini

ErrorDocument /index.php

CMIIW.

ok..... gw tunggu bos....

August 13, 2009 by gedoyman, 1 year 39 weeks ago
Comment: 5627

gedoyman's picture

ok..... gw tunggu bos.... sambil gw cari2 sendiri.......:D

Premium Drupal Themes by Adaptivethemes