Welcome Guest, Not a member yet? Register   Sign In
The URI you submitted has disallowed characters.
#11

[eluser]Daniel Moore[/eluser]
I've never tried to do what you're doing, where you need query strings AND URL segments in the same application.

However, upon glancing at your .htaccess below:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /CI-Directory
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /CI-Directory/index.php/$1 [L]
</IfModule>

There is one thing I noticed. Your rewrite rule ends with [L]. You did not include the QSA directive. Try replacing [L] with [L,QSA] and see if that helps your problem. QSA stands for "Query String Append".

Like I said, though, I've never tried to do what you're doing with CI. If this doesn't work, I don't really have any other suggestions at the moment. Let us know if it does work.
#12

[eluser]verynewtothis[/eluser]
Thanks Daniel for your suggestions..appreciate you took time to look at this..
Unfortunately this didn't change much..

This works fine if I place index.php in the URL.. but gives "URI you submitted has disallowed characters" error without it.
#13

[eluser]verynewtothis[/eluser]
I really hope someone can help me with this.....
#14

[eluser]verynewtothis[/eluser]
Can any one help me in writing an htaccess condition such that as soon as the server receive request for this particular URL:
Code:
http://mywebsite.com/CI-Directory/process?param=0&param2=4

It should automatically "add" index.php in it like this:
Code:
http://mywebsite.com/CI-Directory/index.php/process?param=0&param2=4

Please do note that that number of query string variables can increase or decrease.

This is the only work around I could see of my original problem..
#15

[eluser]verynewtothis[/eluser]
Any help please... :-S
#16

[eluser]bretticus[/eluser]
[quote author="verynewtothis" date="1249646225"]Still seeing the same error. This is what I did.

Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\?=-'; //Added '?' and '='
[/quote]\

I played with this today a little. I didn't try:
Code:
$config['uri_protocol'] = "PATH_INFO";
$config['enable_query_strings'] = TRUE;


Mostly because enable_query_strings is supposed to thwart all the helpful link helper functions (which doesn't seem like a solution to me at all.) So I don't even know if that works (all those folks say that it does.)

My permitted_uri_chars was 'a-z 0-9~%.:_\-\?='. That got around disallowed chars warning. I tried routing from there and gave up after a bit.

I think if I were you I'd create an actual file called process. Then I'd put the following in your .htaccess file:

Code:
<Files "process">
ForceType application/x-httpd-php
</Files>

Your current .htaccess file will not rewrite a request for a real file to index.php. Then I'd just write some good old fashion PHP code. You could probably just include any of your CI libraries that you may need in the standard PHP fashion.
#17

[eluser]verynewtothis[/eluser]
great suggestion.. thanks alot bretticus..
just one last thing... since I am very green with htaccess, could you please also show me how to remove .php extension from the URL below? So it looks more uniformed with the other parts of the system..

Code:
http://mywebsite.com/CI-Directory/process.php?param=0&param2=4 //remove .php but keep every thing else the number of querystring parameters can be 0 or more
..

My htaccess at the moment reads like this:
Code:
<Files "process">
ForceType application/x-httpd-php
</Files>
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /CI-Directory
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /CI-Directory/index.php/$1 [L,QSA]
</IfModule>
#18

[eluser]bretticus[/eluser]
[quote author="verynewtothis" date="1250203644"]great suggestion.. thanks alot bretticus..
just one last thing... since I am very green with htaccess, could you please also show me how to remove .php extension from the URL below? So it looks more uniformed with the other parts of the system..

Code:
http://mywebsite.com/CI-Directory/process.php?param=0&param2=4 //remove .php but keep every thing else the number of querystring parameters can be 0 or more
..

My htaccess at the moment reads like this:
Code:
<Files "process">
ForceType application/x-httpd-php
</Files>
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /CI-Directory
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /CI-Directory/index.php/$1 [L,QSA]
</IfModule>
[/quote]

If you follow my directions, you don't need the php extension. The file is called just "process." No file extension.

Maybe I misunderstood you?
#19

[eluser]verynewtothis[/eluser]
without the php extension, I get 404 not found error..
#20

[eluser]Rayhan[/eluser]
http://www.technologyrider.com/fixed-“th...r-ci-error




Theme © iAndrew 2016 - Forum software by © MyBB