Rewrite on name |
[eluser]iniweb[/eluser]
I'am very interesting how work controller on: http://codeigniter.com/news/ and this rewrite: http://codeigniter.com/news/codeigniter_154_released/ Please show me controller ):
[eluser]xwero[/eluser]
The http://codeigniter.com/news/ you can accomplish by .htaccess and using routing the title of the news can be made url friendly using the url helper function url_title hope this helps
[eluser]iniweb[/eluser]
routes.php: Code: $route['default_controller'] = "main"; news.php (Cotroller): Code: class News extends Controller { http://example.com/news/title/ 404 Page Not Found What further?
[eluser]xwero[/eluser]
The page is not found because you use title and in your route you added the wildcard :num that is why you get a 404 error. http://example.com/news/1/ would lead you to the News_lookup function of your class. What you want to do is Code: // router If you have the url http://example.com/news/title/ you should get a page with the word title
|
Welcome Guest, Not a member yet? Register Sign In |