Welcome Guest, Not a member yet? Register   Sign In
Shortcut $_GET vars in url; disallowed characters
#1

[eluser]popovich[/eluser]
Hi,

I could live with the following issue as it will eventually go away, but my problem is that I want to do everything "right"...

I have an old url, which looks like

Code:
www.wit**.net/***/***/?deu

Now, it may be ?deu or ?eng or ?pyc

There are several abandoned urls of this kind, as the site is now based on CI. I have decided to set up a db-table for the reasons of url mapping and it works ok, as soon as you have no "?" in the url string. As soon as earlier mentioned string comes, the system throws an error:

Code:
The URI you submitted has disallowed characters.

which means, the system haven't looked for the db-table at all, it just stopped running the code.

1. Tried adding ? to the permitted_uri_chars config option — the system then throws an error saying

Quote:A PHP Error was encountered

Severity: Warning

Message: preg_match() [function.preg-match]: Compilation failed: range out of order in character class at offset 18

Filename: libraries/URI.php

Line Number: 188

2. Tried adding some rules to htaccess — 500 Internal Server Error for every page (it might have been wrong order or something, but I cannot experiment with the live-server for too long at this time of day).

Any ideas? All I want is to redirect such urls as
Code:
www.wit**.net/***/***/
www.wit**.net/***/***/?deu

to a specific URL or a navigation item. Thanks for all insights in advance.

Cheers,
A

ps. had to edit because of the search enginges.
#2

[eluser]Seppo[/eluser]
You should escape the ? mark, using \?
#3

[eluser]popovich[/eluser]
Getting the same error...
#4

[eluser]popovich[/eluser]
just bumping this thread. sorry, for being so stubborn, but this time I can't find solution without your help.
#5

[eluser]Michael Ekoka[/eluser]
Quote:1. Tried adding ? to the permitted_uri_chars config option
You forgot to show us that specific bit. I would bet it's something looking like this:
Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-?';

This will throws an error because the regex engine tries to match all characters between _ and ? (_-?), just like it would match all characters between a and z (a-z).

Move your question mark right before the dash.

Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_?-';
#6

[eluser]taewoo[/eluser]
Read this post:

http://ellislab.com/forums/viewthread/72933/
#7

[eluser]Celso Soares[/eluser]
[quote author="Michael Ekoka" date="1208148508"]
Quote:1. Tried adding ? to the permitted_uri_chars config option
You forgot to show us that specific bit. I would bet it's something looking like this:
Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-?';

This will throws an error because the regex engine tries to match all characters between _ and ? (_-?), just like it would match all characters between a and z (a-z).

Move your question mark right before the dash.

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

i did that and i still have the problem




Theme © iAndrew 2016 - Forum software by © MyBB