Having special characters in URLs in CodeIgniter -
i want have urls like
http://www.example.com/(*.)
but codeigniter not allow me that. when seek access urls 404 error (and requested page exists).
i know can set allowed characters in url, thought encoding it. however, if this:
http://www.example.com/<?php echo rawurlencode(string) ?>
or even:
http://www.example.com/<?php echo rawurlencode(rawurlencode(string)) ?>
i still got 404. why that? '%'s allowed characters, why won't work? , can prepare it?
when trying pass urlencoded
strings uri
generate error if encoded string has /
, codeigniter seek parse segment, rendering 404
, need utilize query strings.
$string = rawurlencode(string)
http://www.example.com/class/method/?string=$string
then on method
use get
function method() { $this->input->get('string'); }
codeigniter url encoding routing special-characters
No comments:
Post a Comment