CodeIgniter Forums

Full Version: Problem with Routing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]sherpa[/eluser]
hi everybody,

i have a problem with URI routing.actually i have a url looks like this

http://locahost/show/topic/Film/from-wikipedia-the-free-encyclopedia.html

and, which i want to change into :

http://locahost/Film/from-wikipedia-the-free-encyclopedia.html
[show/topic] hidden

I just want to hide those 'show' -[controller] and 'topic' [method] from displaying in URL.
How could i do this ?
Thanks in advance.

El Forum

[eluser]BorisK[/eluser]
This should work:

Code:
RewriteRule   ^Film/(.*)$  index.php/show/topic/Film/$1

El Forum

[eluser]sherpa[/eluser]
Nah! it doesn't work sumemr student!
any other ideas?

El Forum

[eluser]Grahack[/eluser]
Have a try with routing with regular expressions (please scroll to the section!!!).

El Forum

[eluser]frenzal[/eluser]
try this
$route["Film(.+)*"] = "show/topic/Film$1";