codeigniter-url

codeigniter redirect

My redirect is not working, I can see no reason why it is not working thouhg, can anyone see a reason, function createCookie() { $this->load->helper('url') // Function gets called when the user clicks yes on the firstTime menu. // The purpose of this function is to create a cookie for the user. // First we'll gi...

how insert page number to pdf while exporting data from php

Hi I am exporting data table from php page to pdf I got the page exported to pdf but i can't insert the page number into the pdf file how to insert that function changeDetails() { $bType = $this->input->post('textvalue'); if($bType == "pdf") { $this->load->library('table'); ...

Codeigniter 404 can't find index.php (only on real server, not on virtual server)

Hey, I got a working webpage with CodeIgniter. I did now just upload it to my webserver and it gives me a 404 error. The browser address is "web-page.com/folder/en/about" The baseurl in the config is "web-page/folder/" Also this is in the config.php, I did try AUTO but it does not work either. $config['index_page'] = ""; $config['ur...

CodeIgniter: Page not found when passing parameters to a controller???

Hello, I'm trying to pass parameters to a control in codeigniter, but I'm getting 404 page not found error, I don't get it, I did what the guide says: http://codeigniter.com/user_guide/general/controllers.html#passinguri When I remove the params in the index function and just access the controller everything works fine, but I can't pas...

Remove index.php in CodeIgniter

Hello. I'm trying to remove the 'index.php' from CI Urls. I've tried many solutions, none of them worked. I've already set these variables in 'config.php': $config['index_page'] = ""; $config['uri_protocol'] = "REQUEST_URI"; And my current .htaccess is: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST...

Combine friendly url and query string

How to make working such url: example.com/controller/method?id=1&cat=2 ...

How to make CodeIgniter accept "query string" URLs?

According to CI's docs, CodeIgniter uses a segment-based approach, for example: example.com/my/group If I want to find a specific group (id=5), I can visit example.com/my/group/5 And in the controller, define function group($id='') { ... } Now I want to use the traditional approach, which CI calls "query string" URL. Ex...

Redirect CI problem

Hi I'm kind of new with CodeIgniter and I'm still learning (a lot). So I have a view and when I submit a form I 'call' the controller by surfing to the right URL dynamically e.g. site/delete class Site extends Controller { function index(){$this->load->view('...')} function delete() { $this->site_model->delete_ro...

code igniter codeigniter question, making anchor load page containing data from referenced row in DB

Hi, Im trying to learn the code igniter library and object oriented php in general and have a question. Ok so Ive gotten as far as making a page which loads all of the rows from my database and in there, Im echoing an anchor tag which is a link to the following structure. [code]echo anchor("videos/video/$row->video_id", $row->video_ti...

Codeigniter redirect with base_url

I noticed that anchor('controller/method') produces a different result than a mere <a href="controller/method"> in that anchor() adds the base_url: anchor('controller/method'): <a href="http://localhost/dts/controller/method"&gt;Link&lt;/a&gt; <a>: <a href="controller/method">Link</a> How do I achieve this same effect (anchor) in ...

Codeigniter: Base_url doesn't seem to be working

I have developed a simple site that fetches tweets from the Twitter public timeline, caches them for 60 seconds and so on. I have recently moved hosts from Hostgator to Mediatemple and my site was previously working fine on Hostgator. My application doesn't use a database connection, nor does it use any form of flat-file database either...

Best method for URI Routing this in CodeIgniter?

Hi folks! So, here's an example on Forrst, a CodeIgniter website: http://forrst.com/posts/PHP_Nano_Framework_WIP_Just_throwing_some_ideas_o-mU8 Look at that nice URL. You've got the root site, then posts, then the post title and a short extract. This is pretty cool for user experience. However, my CodeIgniter site's URLs just plain s...

CodeIgniter + encodeURIComponent

Hi I'm trying to retrieve a url sent in the query strings in a codeigniter function: function recipe($url = ''){ $url = $this->uri->uri_string(); $url = ltrim($url, '/bookmarklet/recipe/'); log_message('info', 'URL: ' . rawurldecode($url)); However for some reason the url is always missing a '/' in the h...

Make codeigniter behave on $_GET's ?

I've had a problem with CI handling $_GET and found a way to overcome it. The question is, can you see any security problem here? I have my urls all ways like /contacts /company/info And my default controller on CodeIgniter is called index I can make CI behave with $_GET as long as I follow the class/function/default_controller....

Which file structure would be most appropriate for codeigniter?

Hello there I am having some thoughts on my file structure in codeigniter.What I'm doing right now is creating a folder with the project I'm developing for and name it let's say "myProject" then I put my codeigiter folder inside that file.And then everything is done normally as by creating a class called myProject again on the controller...

My url data isn't passing to my codeigniter controller's function.

The domain I'm using is ->http://www.domainname.com/admin/users/edit/1 class Cal_Admin extends Controller { function Cal_Admin() { parent::Controller(); $this->load->model('events/model_events'); $this->load->model('users/model_users'); } function index() { $data['events'] = $this->model_events->get_home_entries()...

Codeigniter + Opencart on one host -- URI routing problems

OK I searched the boards and could not found any specific answer. the website and the shop aren't the same. Codeigniter has been used for handling everything so now I want to add a shop using Opencart and the URI routing is the problem. (The truth is Im not a CI fan but since the guy before me used it I have no other choice but to cont...

codeigniter multidomain setup question

Hi all, I am trying to make a multidomain setup of codeigniter. I need to support links like this www.site.com/users/username subdomain.site.com www.othersiteparkedonsite.com in this 3 different cases i want to load application folder regarding the case following code in index.php will work only with subdomain and domain case //...

Default Controller not loading after rerouting

I have a codeigniter multistie install where I have such code that I can serve sites with such links site.com/sites/sitename/controller/function/vars site.com/controller/function/vars/ subdom.site.com/controller/function/vars the challange is that , whith the routing $route['sites/([^/]+)/(.*)'] = '$2'; $route['default_controller']...

URL routing in codeigniter

Hello all I have been using .htaccess files to redirect some of my renamed controllers/actions. Say for example... RewriteRule ^top/index/?(.*)?$ /index.php/home/index/$1 [L] Can I use the config/routes.php file for the same purpose or is it that routes.php can only be used for URL rewriting or is is that it recognises the controller...