Welcome Guest, Not a member yet? Register   Sign In
Period changed to underscore
#11

[eluser]phazei[/eluser]
I added the 'QSA' but it didn't make a difference.

I'll just stick with either QUERY_STRING or REQUEST_URI. Shouldn't matter I don't believe.
#12

[eluser]Colin Williams[/eluser]
You probably don't want to use QUERY_STRING because then you rely on the query triggers and not paths. I would stick with REQUEST_URI

And I'm not sure what you mean be these items "not existing." They're environment variables. They should all exist.
#13

[eluser]phazei[/eluser]
By not exist I just meant they were empty '' if I echoed them.
#14

[eluser]jeffpeck[/eluser]
To anybody having an issue with this, this might help. It appears that it is using the $_GET variable which you can plainly view is converting any periods to underscores. As noted here, this is the expected behavior of $_GET:
http://php.net/manual/en/language.variab...ternal.php

Quote:Note: Dots and spaces in variable names are converted to underscores. For example <input name="a.b" /> becomes $_REQUEST["a_b"].

To fix this, modify the config.php file:

Code:
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO'            Default - auto detects
| 'PATH_INFO'        Uses the PATH_INFO
| 'QUERY_STRING'    Uses the QUERY_STRING
| 'REQUEST_URI'        Uses the REQUEST_URI
| 'ORIG_PATH_INFO'    Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol']    = "QUERY_STRING";

In my case, QUERY_STRING worked. You might need to try others, or have the script print_r($_SERVER) to easily find the correct variable.
#15

[eluser]Unknown[/eluser]
I just ran into this issue. It's pretty simple actually. If you are using friendly URLs, which you likely are, then you may go 2 routes in your .htaccess: index.php/something or index.php?/something. If you use the first, without the ?, it should work with AUTO or REQUEST_URI, if you use the second, it should work with QUERY_STRING. Personally, I wouldn't use the second, because it's in PHP's functionality to replace your dots (and more) with underscores.

In my case, I was using BOTH in my htaccess, a different one for each module in HMVC. It was pretty confusing at first, haha Wink

Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)admin(.*)$ index.php?/admin/$2 [L]

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

One a query, the other not = problem.




Theme © iAndrew 2016 - Forum software by © MyBB