• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
seegatesite header

Seegatesite.com

Seegatesite.com - Programming Tutorial , Sharing , How and Learn Together

  • TOOLS
    • Bootstrap Navbar Online Generator
    • Customize Sidebar Menu Bootstrap 3
    • Bootstrap Demo
  • ADVERTISE
  • CATEGORIES
    • Android
    • Blogging Tips
    • Database
    • CSS
    • Info Gadget
    • Javascript
    • Linux
    • PHP
    • Various
    • WordPress
  • Q&A
  • PHP
  • JAVASCRIPT
  • JQUERY
  • ANGULAR
  • WORDPRESS
  • SEO
  • REACT
🏠 » PHP » How To Remove Index php Url Path Codeigniter

How To Remove Index php Url Path Codeigniter

By Sigit Prasetya Nugroho ∙ July 5, 2017 ∙ PHP ∙ Leave a Comment

Share : TwitterFacebookTelegramWhatsapp

The default URL display in the CodeIgniter app is not good to see because there is an index.php path. To remove index.php URL path CodeIgniter simply add a script to the .htacces file. Consider the following short tutorial.

Read another tutorial: Introduction – PHP Codeigniter Tutorial For Dummies Step By Step

PHP Codeigniter is a PHP framework that is liked by many people, for those of you who just do the installation CodeIgniter and access your project then you will surely see a less good view its URL like the example below:

1
http://example.com/index.php/product

Well so that better and easier to remember, then we will change its URL so like this

1
http://example.com/product

The way is quite easy, because we only need to make changes in config settings and create .htaccess file, okay now we will first create a file with the name .htaccess and we store in the root folder of our application, the contents of the file .htaccess as below:

Related Articles :

  • CodeIgniter Tutorial How To Make Rest API ( Server And Client )
  • Simple CRUD Apps With Codeigniter Tutorial For Beginners
  • PHP Codeigniter MVC Concept For Dummies With Simple Example

1
2
3
4
5
6
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?/$1 [L]

And the next step is to change the bit setting of the CodeIgniter configuration. Change default settings

1
2
// application/config/config.php
$config["index_page"] ="index.php";

Be like the following

1
$config["index_page"] ="";

Then please access your project with the above URL above, if successful should your controller can be accessed correctly, but if not successful there is possibility mod_rewrite module from Apache not yet active. The solution tries to open httpd.conf file and find the following script:

1
#LoadModule rewrite_module modules/mod_rewrite.so

And unmark #, so it looks like this:

1
LoadModule rewrite_module modules/mod_rewrite.so

After that, please restart apache and try to access. So my brief tutorial, hopefully, useful

Another PHP Related Post :

  • How To Replace String With Another String In PHP
  • Login Page – Tutorial CRUD Client and API Server Using JQuery And Lumen Part 2
  • Tutorial CRUD Client and API Server Using JQuery And Lumen Part 1
  • How To Solve Problems Illegal mix of collations (latin1_swedish_ci,IMPLICIT) In Laravel
  • How To Resolve No ‘Access-Control-Allow-Origin’ Header In Lumen
  • How To Create Custom Class In Laravel 5.5 For Beginners

Avatar for Sigit Prasetya Nugroho

About Sigit Prasetya Nugroho

This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.

Reader Interactions

Leave a Reply Cancel reply

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

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Welcome to my Home,

Avatar for Sigit Prasetya NugrohoThis site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.



Popular Articles

Checked checkbox AdminLTE Bootstrap in Jquery

November 4, 2014 By Sigit Prasetya Nugroho 7 Comments

Simple create date format validation with jqueryUI

December 21, 2014 By Sigit Prasetya Nugroho Leave a Comment

Create Simple Progress Bar for Fake Online Generator with Jquery

January 10, 2015 By Sigit Prasetya Nugroho Leave a Comment

22+ Coolest Free Jquery Plugin For Premium Theme

October 3, 2015 By Sigit Prasetya Nugroho Leave a Comment

Easy Build Your Anti Copy Paste Plugin

October 6, 2015 By Sigit Prasetya Nugroho Leave a Comment

Popular Tags

adminlte (15) adsense (13) adsense tips (4) affiliate amazon (13) amazon (12) Android (8) angular (16) angular 4 (12) angular 5 (4) asin grabber (3) Bootstrap (27) codeigniter (5) create wordpress theme (5) crud (8) css (6) free wordpress theme (7) google adsense (4) imacros (4) increase traffic (6) jquery (34) laravel (10) laravel 5 (5) learn android (5) modal dialog (5) mysql (6) nodeJs (4) optimize seo (4) pdo (6) php (30) plugin (53) pos (7) Publisher Tips (5) react (3) Reactjs (7) SEO (37) theme (17) tutorial angular (5) tutorial angular 4 (6) tutorial javascript (10) tutorial javascript beginners (4) twitter (3) widget (3) wordpress (18) wordpress plugin (13) XMLRPC (5)




  • About
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions

©2021 Seegatesite.com