CodeIgniter QueryStrings
First of all I MUST point out that I am NOT a programmer, have NO desire to be a 开发者_如何学Goprogrammer, and the application i am speaking of was NOT written by me. I am just an average end user trying to make things work like I need them to work. That being said,
Two simple questions:
1.) Why will urls like this not work with codeigniter powered apps ?
http://somesite.com/search?q=something
2.) How do I force it to work like that ?
I have read atleast 2 dozen articles on the issue and NOTHING has worked. I have enabled QueryStrings in the config file, I have change the url_protocol to PATH_INFO, I have set my forms from post to get and NOTHING works.
HELP...
Ok, try changing $config['uri_protocol'] = "PATH INFO"; to $config['uri_protocol'] = "REQUEST_URI";
If this still does not work, check your .htaccess
file for a rule that removes index.php
from URL; it will be of the form:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/?$1 [L]
If this rule exists, change the last line to `RewriteRule ^(.*)$ index.php/$1 [L]
Notice, the ? is removed from last line. Check after doing above steps. Hope this works.
精彩评论