CodeIgniter Forums
Problem with Routing - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Problem with Routing (/showthread.php?tid=7740)



Problem with Routing - El Forum - 04-21-2008

[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.


Problem with Routing - El Forum - 04-21-2008

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

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



Problem with Routing - El Forum - 04-21-2008

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


Problem with Routing - El Forum - 04-21-2008

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


Problem with Routing - El Forum - 04-21-2008

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