Welcome Guest, Not a member yet? Register   Sign In
URI routing - 3 segment
#1

[eluser]Unknown[/eluser]
My code:
htaccess
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

config.php
Code:
$config['index_page'] = 'index.php';
$config['uri_protocol']    = 'REQUEST_URI';
$config['url_suffix'] = '';

routes.php
Code:
$route['file-(:num)'] = 'file/czyt/$1';

file: file.php method: czyt
Code:
public function czyt()
        {
            echo $this->uri->segment(3);
        }

when i take a request:

http://localhost/frame/file-123

i give a blank page with no echo data ?? HOW can i read the data from third segment ?

Ofcourse when i run http://localhost/frame/file/czyt/123 i had the 123 in my echo statment




Theme © iAndrew 2016 - Forum software by © MyBB