I see, learn and rediscover… everyday!
Query String in URL using Codeigniter
CodeIgniter by default won’t allow you to use query strings in the URL.
This is how you enable query string in url in codeigniter.
1. Set $config['uri_protocol'] = “PATH_INFO” in config.php
2. Set $config['enable_query_strings'] = TRUE in config.php
3. Make you sure you have QSA in your .htaccess. For example,
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|includes)
RewriteRule ^(.*)$ /index.php/$1 [L,QSA]
Note: If you make these changes, the pagination module is affected. So, if you had implemented any pagination before changing these settings, you might want to check them again.
| Print article | This entry was posted by sp2hari on June 6, 2010 at 1:38 am. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |