Welcome Guest, Not a member yet? Register   Sign In
Doubt on url Formation
#1

[eluser]oldrock[/eluser]
Hi ..,

I need to get the url of my site as www.mysite.com/web-page/webpage

my doubt is hoe to obtain an url with hyphen since the function names and class names does not permit hyphen in them.., so i can not name my controllers class and functions with hyphen's.

so just guide me to obtain the url in the above format it would be very grateful for me.

thanks in advance
#2

[eluser]Jônatan fróes[/eluser]
You can config it in your route
Code:
$route["web-page/(:any)"] = "web_page/$1"
#3

[eluser]oldrock[/eluser]
Hi..,

Thanks For Your Reply , but i still get 404 page not found

The original URL that looks in the address bar should be like this http://cricruns.com/world-cup-2011/teams

which should point to the controller named world_cup_2011in my controller folder.

I have configured my routes file as directed by you as follows

$route['world-cup-2011/(:any)'] = "world_cup_2011/$1";

Whether my setting is right or i am going wrong some where...?

Thanks in advance
#4

[eluser]Jônatan fróes[/eluser]
Code:
$route['world-cup-2011'] = "world_cup_2011"; //index page
$route['world-cup-2011/(:any)'] = "world_cup_2011/$1"; //others pages
#5

[eluser]oldrock[/eluser]
That has done the trick..

Thanks a lot




Theme © iAndrew 2016 - Forum software by © MyBB