Welcome Guest, Not a member yet? Register   Sign In
Periods in URLs are removed
#1

[eluser]Marcel Karras[/eluser]
Hello,

have a look at the following request URL:
Code:
http://localhost/my_project/de/system/my_class/my_method/my_param/My parameter value./my_further_param/100/
The following PHP source lines are located in my_method:
Code:
echo '1: '.$this->uri->uri_string().'<br/>';
echo '2: '.$_SERVER['REQUEST_URI'];
The HTML output is as following:
Code:
1: http://localhost/my_project/de/system/my_class/my_method/my_param/My parameter value/my_further_param/100/
2: http://localhost/my_project/de/system/my_class/my_method/my_param/My%20parameter\%20value./my_further_param/100/
My allowed character config is:
Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
My root system/.htaccess looks this:
Code:
RewriteEngine On
RewriteCond $1 !^(application|index\.php|index\.html|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
Even if I set RewriteEngine to Off it has the same effect. Can someone help me on that?

Greetings
- Marcel
#2

[eluser]pistolPete[/eluser]
Try the different settings of
Code:
$config['uri_protocol'] = ?;
#3

[eluser]Marcel Karras[/eluser]
This is no option for me as I've been working with "AUTO" for the whole project and a change will effect the overall behavoir. Maybe the only chance for me is to use the Encryption Class and encode/decode the variables?
#4

[eluser]pistolPete[/eluser]
Quote:a change will effect the overall behavoir.
Why?
Your URLs still look the same, you just change CI's internal way on how to retrieve the URI segments. This shouldnt affect any of your code!
#5

[eluser]Marcel Karras[/eluser]
If I use "QUERY_STRING" for instance not even the start page can be found. (404 errors on all pages) A change to "PATH_INFO" for instance brakes my "redirect('path/to/controller')" methods. Is there another way to circumvent this behavior?
#6

[eluser]xwero[/eluser]
How does path_info break your redirects?
#7

[eluser]Marcel Karras[/eluser]
Sorry, it was "QUERY_STRING" not "PATH_INFO" but the latter doesn't affect the above described removing of periods.
#8

[eluser]xwero[/eluser]
Try updating the router and uri class, i just tested your url using 1.7.0 and the period stays in the uri_string.




Theme © iAndrew 2016 - Forum software by © MyBB