{"id":561,"date":"2010-06-06T01:38:34","date_gmt":"2010-06-06T08:38:34","guid":{"rendered":"http:\/\/sp2hari.com\/?p=561"},"modified":"2020-06-20T08:28:13","modified_gmt":"2020-06-20T08:28:13","slug":"query-string-in-url-using-codeigniter","status":"publish","type":"post","link":"https:\/\/sp2hari.com\/index.php\/2010\/06\/06\/query-string-in-url-using-codeigniter\/","title":{"rendered":"Query String in URL using Codeigniter"},"content":{"rendered":"<p>CodeIgniter by default won&#8217;t allow you to use query strings in the URL.<\/p>\n<p>This is how you enable query string in url in codeigniter.<\/p>\n<p>1. Set $config[&#8216;uri_protocol&#8217;]\t= &#8220;PATH_INFO&#8221; in config.php<\/p>\n<p>2. Set $config[&#8216;enable_query_strings&#8217;] = TRUE in config.php<\/p>\n<p>3. Make you sure you have QSA in your .htaccess. For example,<\/p>\n<p><code>RewriteCond %{REQUEST_FILENAME} !-f<br \/>\nRewriteCond %{REQUEST_FILENAME} !-d<br \/>\nRewriteCond $1 !^(index\\.php|images|includes)<br \/>\nRewriteRule ^(.*)$ \/index.php\/$1 [L,QSA]<\/code><\/p>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CodeIgniter by default won&#8217;t allow you to use query strings in the URL. This is how you enable query string in url in codeigniter. 1. Set $config[&#8216;uri_protocol&#8217;] = &#8220;PATH_INFO&#8221; in config.php 2. Set $config[&#8216;enable_query_strings&#8217;] = TRUE in config.php 3. Make you sure you have QSA in your .htaccess. For example, &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-561","post","type-post","status-publish","format-standard","hentry","category-code"],"_links":{"self":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/comments?post=561"}],"version-history":[{"count":3,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/561\/revisions"}],"predecessor-version":[{"id":564,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/561\/revisions\/564"}],"wp:attachment":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/media?parent=561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/categories?post=561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/tags?post=561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}