Questions tagged [codeigniter-routing]

Questions about routing a particular URI, or pattern of URIs to a controller class and method, within the CodeIgniter PHP framework.

In CodeIgniter routes are defined in the application/config/routes.php file. Routes can simply be added to the array $route. CodeIgniter supports both wildcard and regular expression based routing rules in addition to static ones.

Read more in the CodeIgniter documentation.

245 questions
0
votes
2 answers

Codeigniter URI: Creating Default Controller function

I have the following class in my controller (codeigniter) class Books extends CI_Controller { function index($id = NULL){ //model //view } } I have this link in my view file /books/index/
black_belt
  • 6,601
  • 36
  • 121
  • 185
0
votes
1 answer

codeigniter variable segments

I'm having a problem with codeigniter segments. Im looking for something like this where my controller is contacts and the action is list: localhost/index.php/contacts/list/limit/10/offset/100/orderBy/postalCode/search/john/ This way I can mix my…
Thijs van Beek
  • 105
  • 1
  • 5
0
votes
2 answers

Codeigniter URI Routing

I have check the codeigniter user guide, But I was not lucky to solve my problem. I have created a webpage on my localhost. When I go to http://localhost/webpage/ it is okay. It will go to the default controller. My default controller is Homepage…
justin
  • 1,659
  • 5
  • 21
  • 25
0
votes
2 answers

To Nest or Not to Nest? MVC Controllers (CodeIgniter)

Background: I'm having some trouble understanding exactly how to best use controllers in an MVC architecture. I have a webapp that follows this URL scheme: / - main index /static-page - static pages /categories - index for specific…
ServAce85
  • 1,602
  • 2
  • 23
  • 51
-1
votes
1 answer

Develop a sub-websites (micro websites) in Codeignitter

Let's say I have a website called http://mysite.dev What I have: So the urls of some pages will be below. Home page: http://mysite.dev or http://mysite.dev/site/index or http://mysite.dev/home (site/index has been routed to home) Edit Profile:…
-1
votes
2 answers

Codeigniter Controller class login form : 404 page not found

Im trying to combine several tutorials about Codeigniter and bootstrap and understand per codes so i can integrate it in my project. What i am trying to do right now is create a login form using the two framework. And i setup my View according to…
-1
votes
1 answer

.htaccess for Different Folder Paths on Server vs. Dev Environment?

I'm moving my app (a CodeIgniter app-- I'm not sure if that is relevant) to a new web host and have to resolve some questions about pathing. On my localhost dev environment, everything is working. Here is the folder layout: Root Directory…
VikR
  • 4,818
  • 8
  • 51
  • 96
-1
votes
2 answers

how to make url as pretty url in codeigniter

I am new to ci. naybody knows how to minify the url. for example : yourdmain.com/blog/view/blog-title I need this url to be like this : yourdmain.com/blog-title please explain how to do this this can be many like blog, categories, pages, posts…
-1
votes
1 answer

How to redirect a given short url link to another url just as Vine do

I am trying to redirect a Short Url to another Url, For a better understanding Consider https://get.vine.co if we paste this on the Desktop Browser we will be redirect to …
Ramaraju.d
  • 1,301
  • 6
  • 26
  • 46
-1
votes
1 answer

Turn off mod rewrite for specific template in Codeigniter

If I have a view located at application/views/templates/games/gamename/ is there a way to turn off mod_rewrite for that directory? Also, is there a way to not use the smarty templating for that view? The reason I want to do this is because I have a…
-1
votes
2 answers

how to load my default controller in codeigniter using bootstrap?

i have a view with bootstrap template which is embedded at my view/reportlist.php (localhost/Project/index.php). the problem is that every time i perform a CRUD, well codeigniter reroutes me to deffirent uri. example, when i edit a report from my…
-1
votes
1 answer

Can I call a model function using the URL (without using routes)? CodeIgniter

It is my understanding that, by default, Codeigniter user this patter to access functions. http://domain.tdl/controller/model can this be done by default without having to edit the routes?
Todd Jenk
  • 301
  • 1
  • 3
  • 13
-1
votes
1 answer

can't access Codeigniter database

I'm creating a website and I've been trying to connect to the database, I really can't find the problem. all I need is to get all "job_desc" from my database "bcjobs" and after a user can click a "job_desc" for him to be able to see the full details…
pic-a
  • 13
  • 1
  • 6
-1
votes
3 answers

How to make urls like category/5/sub_category in CodeIgniter

I want my urls to look like: www.domain.com/catalog/category_name/category_id/product_name/product_id. How should my controllers look like to accomplish this? It's ok for the Controller to have Catalog and Function category_name in it. But what will…
-1
votes
1 answer

Codeigniter organizing controllers structure

Let's take for example a small social network site. One of modules are also Quizzes. Quizzes module have the following sections: -Create quize -Edit quize -Quize view -Browse quizes -Send quize to friend I am wondering what would be the best way in…
user1324762
  • 765
  • 4
  • 7
  • 24
1 2 3
16
17