i’m trying to create a url string that works like this:
/app/process/example.com/index.html
so in other words,
/app/process
One way to get around this problem would be to replace any forward slashes in your URL variable which you are passing in the URI segments with something that would not break the CodeIgniter URI parser. For example:
$uri = 'example.com/index.html';
$pattern = '"/"';
$new_uri = preg_replace($pattern, '_', $uri);
This will replace all of your forward slashes with underscores. I'm sure it is similar to what you are doing to encode your forward slashes. Then when retrieving the value on the other page simply use something like the following:
$pattern = '/_/';
$old_uri = preg_replace($pattern, '/', $new_uri);
Which will replace all the underscores with forward slashes to get your old URI back. Of course, you'll want to make sure whatever character you use (underscore in this case) will not be present in any of the possible URIs you'll be passing (so you probably won't want to use underscore at all).