Welcome Guest, Not a member yet? Register   Sign In
uri_protocol=PATH_INFO + enable_query_strings=TRUE doesn't work on local
#1

[eluser]Isuka[/eluser]
Hi all,

I have a little problem that I dont understand.
I need to enable query_string for a site I'm developping, so I've made some change in my config file :
Code:
$config['uri_protocol']    = "PATH_INFO";
$config['enable_query_strings'] = TRUE;

It work great on the production server but not on my local server. I'm wondering why.

With uri_protocol to PATH_INFO / ORIG_PATH_INFO, all my controller show the default controller.
With uri_protocol to REQUEST_URI, I got a 404 Page Not Found.

I use PHP Version 5.2.4 and Apache 1.3.41

Here what my .htaccess looks like :
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/(images|skins)/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php/$1 [L]

Thanks for any advices Smile
#2

[eluser]Mitchell McKenna[/eluser]
ever figure out why you get the "404 Page Not Found" when you change this?

edit: Changed $config['uri_protocol'] to "AUTO" and it worked.
#3

[eluser]jfedgar[/eluser]
I am having the same problem. I cannot change uri_protocol to 'auto', as then app will not read the GET info that is being returned. I cannot use PATH_INFO, as then for some reason I run into the same problems as the original poster - it will always return me to my default controller.

It seems that there is something seriously wrong with CI's query string support. It is VERY common to have web services (for example EVERY google service) return tokens and other information via GET.

Im finding that having a website that supports both clean urls, and utilizes these webservices on an apache server is all but impossible.
#4

[eluser]Qasim.B[/eluser]
Why don't you all try with PATH_INFO and set enable_query_strings = TRUE in config.php.
I had used lot of web services (Twitter, Facebook etc) using this method.


It works for me :-)
#5

[eluser]Jonathan Angel[/eluser]
If you get 302 or 404 erros, you may need to modify your .htaccess file. Remove the question mark from the following rewriterule where it occurs:

RewriteRule ^(.*)$ /index.php?/$1 [L]

becomes

RewriteRule ^(.*)$ /index.php/$1 [L]




Theme © iAndrew 2016 - Forum software by © MyBB