Misc.

How to remove index.php from CI URL?

  • Open application/config/config.php file. Find following statement in this file.
    $config[‘index_page’] = ‘index.php’;
  • And remove index.php from above statement, this will look like following.
    $config[‘index_page’] = ”;
  • Create .htaccess file in application directory and paste following statements in it.
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
       #if you are working on localhost then above statement will be    RewriteBase /&lt;your_path&gt;
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?/$1 [L]
    <IfModule>
    
  • Make sure you have mod_rewrite is activated. If not; then visit How to activate mod_rewrite.

Want to get PHP Application Development Service, then hire me at OutsourceUrDesign

websourceblog

ReactJs, NodeJs, Amazon Web Services, Symfony, Laravel, CodeIgniter, Zend Framework, WordPress, Drupal, Magento, Angular

View Comments

  • Thank you for another essential article. Where else could anyone get that kind of information in such a complete way of writing? I have a presentation incoming week, and I am on the lookout for such information.

  • This is the right blog for anyone who wants to find out about this topic. You realize so much its almost hard to argue with you (not that I actually would want…HaHa). You definitely put a new spin on a topic thats been written about for years. Great stuff, just great!

  • Wonderful site you have here but I was wondering if you knew of any message boards that cover the same topics talked about in this article? I'd really love to be a part of community where I can get feedback from other knowledgeable individuals that share the same interest. If you have any recommendations, please let me know. Thank you!

  • I am regular reader, how are you everybody? This article posted at this web site is in fact
    fastidious.

  • There are some interesting points in time in this article but I don’t know if I see all of them center to heart. There is some validity but I will take hold opinion until I look into it further. Good article , thanks and we want more! Added to FeedBurner as well.

  • I was very pleased to find this web-site.I wanted to thank for your time of this wonderful read!! I definitely enjoy every little bit of it and I have you bookmarked to check out new stuff you blog post.

  • Certainly with your thoughts here and that i love your blog! I've bookmarked it making sure that I can come back & read more in the foreseeable future.

  • It is really a great and useful piece of info. I'm glad that you shared this useful info with us. Please keep us informed like this. Thank you for sharing.

Recent Posts

How to reset WSL 2 user’s password?

You can easily reset WSL 2 users' password, by just following the following steps. Open…

2 months ago

DreamHost Web Hosting

DreamHost a web hosting company, founded in 1997. It is offering sort of hosting services,…

10 months ago

How to add submenu or menu in any specific menu option in WordPress programmatically?

Menus in WordPress are highly versatile and can be easily modified to change in your…

11 months ago

Laravel 8 error target class controller does not exist.

Laravel is famous and robust PHP framework, widely used in different type of projects. While…

1 year ago

Define Private Methods/Functions in Python Class.

Python is very powerful and famous language, which allow us to write code as per…

2 years ago

Working with dates in PHP.

In this article, I am going to show you how we can get specific dates…

2 years ago