Welcome Guest, Not a member yet? Register   Sign In
Query String
#1

[eluser]patsy[/eluser]
Hi,

I'm working on code that was developed by someone else and need to make some modifications to the query string. At present the code does not allow query strings. I need to create an exception as I have a page that takes serialno and serialcode as input query strings. What would be the best way to achieve this?

This is the code at the moment:

RewriteCond %{QUERY_STRING} ^.*=(ht|f)tp\://.*$ [NC]
RewriteCond %{QUERY_STRING} !^.*Connector=.* [NC]
RewriteRule .* - [F,L]
#2

[eluser]Tpojka[/eluser]
Is config.php file set as well?
There are settings for enabling query strings.
#3

[eluser]patsy[/eluser]
Hi Tpojka, thanks for your response.

This is what config.php looks like

$config['enable_query_strings'] = TRUE;
$config['module_trigger'] = 'mod';
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use
#4

[eluser]Tpojka[/eluser]
Hi,

I think, there should be $config['uri_protocol'] = 'QUERY_STRING'; set too.
I am just guessing this by logic. Haven't use query strings in CodeIgniter yet.
#5

[eluser]patsy[/eluser]
The setting for uri_protocol is currently 'AUTO'. If I change it to QUERY_STRING all my links stop working. This is the format of the other links -

http://localhost/sitename/registersite.online_quote
#6

[eluser]Tpojka[/eluser]
I could say not common practice.
There are two ways I used in coding PHP pages:
1. query strings
Code:
www.website.tld/page.php?arg1=val1&arg2=val2
2. uri segments such as in CodeIgniter native URL formed
Code:
www.website.tld/page/val1/val2
That url you have there is very odd to my intellection of PHP code.




Theme © iAndrew 2016 - Forum software by © MyBB