What are CodeIgniter URLs?
https://www.zyxware.com/sites/default/files/styles/user_image/public/default_images/index.png?itok=2YmREnrP
BY magi.yv
4 years ago
CodeIgniter
0 comments comment

CodeIgniter URL's are search engine friendly and user friendly. CodeIgniter using segment based approach rather than query string. But it supports query strings, you can optionally enable it.

URI segments:

CodeIgniter follows the Model- view-Controller approach, so the segments of the URI also follows the same. For example -mywebsite.com/article/health/8. The first segment is the controller class. The second one is the method in that controller. The third one is the Id, the parameter which required for that function.

By default, the index.php also part of the URL, but we can remove that by using .htaccess file. Before that, you should enable mode_rewrite in your Apache server. Then add the following rules in the .htaccess file.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

To know more about CodeIgniter URL's, contact us. For further help, check this out.


RELATED ARTICLE

/themes/custom/zyxpro_light/images/placeholder.png
more_horiz
close

on 02nd March 2016 / by magi.yv
Forms are probably essential part in websites. Because forms are creating the user interface to collect data from users. In CodeIgniter we can generate and handle data with the help of form helper. CodeIgniter Leave a reply Your email address will not be published. Required fields are marked *
/themes/custom/zyxpro_light/images/placeholder.png
more_horiz
close

on 11th August 2015 / by magi.yv
Some times we need static pages on sites. In CodeIgniter, to show a static page in a site, you have to create a Controller for handling the page display. A Controller is a class which has methods to handle the HTTP request, that is Models and Views in a site. CodeIgniter Leave a reply Your email address will not be published. Required fields are marked * Troy (not verified) access_time 10 Nov 2019 - 17:21 Hi, Is it possible to make just ONE Controller for all view and pass the path (ie. views/pages/about-us/organization.php) to it instead of creating controllers for each one (ie About, Contact, FAQs)? I am looking forward to your response. Add new comment
/themes/custom/zyxpro_light/images/placeholder.png
more_horiz
close

on 31st August 2015 / by magi.yv
CodeIgniter URL's are search engine friendly and user friendly. CodeIgniter using segment based approach rather than query string. But it supports query strings, you can optionally enable it. CodeIgniter SEO Leave a reply Your email address will not be published. Required fields are marked *
Leave a reply
Your email address will not be published. Required fields are marked *

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
The content of this field is kept private and will not be shown publicly.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.