Thursday, October 24, 2013

Menghilangkan index.PHP pada codeigniter url

1. Buat file .httacess dengan isi sbb :
RewriteEngine On

# Put your installation directory here:
# If your URL is www.example.com/, use /
# If your URL is www.example.com/site_folder/, use /site_folder/

RewriteBase /ci1/

# Do not enable rewriting for files or directories that exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# For reuests that are not actual files or directories,
# Rewrite to index.php/URL
RewriteRule .* index.php/$0 [PT]


2.Edit File  Application/Config/config.php

$config['index_page'] = '';

No comments:

Post a Comment