codeigniter-url

Codeigniter: Base_url doesn't seem to be working

扶醉桌前 提交于 2019-12-02 04:52:58
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. Tweets are cached in an XML file stored in the root directory, not that most of that is important. The url helper is being included as can be seen below (this is my helpers line from autoload.php): $autoload['helper'] = array('url'); I have also removed my

Codeigniter .htaccess

为君一笑 提交于 2019-12-02 04:02:03
问题 Sorry for my bad english... I have the most basic possible CodeIgniter setup and can't make it work... if i access the url http://domain.com/index.php?controllerX/method it works fine. Now I want to be able to access http://domain.com/method I configured on routes.php "controllerX" to be the default controller and try to use the follow .htaccess: RewriteEngine on RewriteCond $1 !^(index\.php) RewriteRule ^(.*)$ /index.php/$1 [L] I have tried multiple .htaccess and everytime the server just

Codeigniter URL not working without index.php

醉酒当歌 提交于 2019-12-01 19:00:10
问题 I've just set up a new webiste http://www.reviewongadgets.com But there is a problem with URL rendering When I put an URL as below it's not working and gives page not found error http://www.reviewongadgets.com/latest-mobile But it works with http://www.reviewongadgets.com/index.php/latest-mobile I don't want to show index.php in my URL, it should be http://www.reviewongadgets.com/latest-mobile , can you please suggest me what should I do ? This is my .htaccess file contents: RewriteEngine on

Codeigniter URL not working without index.php

最后都变了- 提交于 2019-12-01 18:54:47
I've just set up a new webiste http://www.reviewongadgets.com But there is a problem with URL rendering When I put an URL as below it's not working and gives page not found error http://www.reviewongadgets.com/latest-mobile But it works with http://www.reviewongadgets.com/index.php/latest-mobile I don't want to show index.php in my URL, it should be http://www.reviewongadgets.com/latest-mobile , can you please suggest me what should I do ? This is my .htaccess file contents: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1

CodeIgniter mod_rewrite gives 404 error

爱⌒轻易说出口 提交于 2019-11-30 09:55:40
问题 I have written a CodeIgniter application and I want to use mod_rewrite to clean up my URL's. I have installed the CodeIgniter application in htdocs/ci-intro/ Here is my .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /ci_intro/ #Removes access to the system folder by users. #Additionally this will allow you to create a System.php controller, #previously this would not have been possible. #'system' can be replaced if you have renamed your system folder. RewriteCond %

Route to multiple sub folders in CodeIgniter

馋奶兔 提交于 2019-11-30 03:55:40
问题 I have a admin folder set up in my controllers directory, under that i have 3 seperate sub-folders with controllers inside of them. -- Controllers ---- Admin ------ Dashboard -------- dashboard.php -------- file.php ------ Members -------- members.php -------- file.php ------ Settings -------- settings.php -------- file.php I tried routing it in the routes.php file like this $route['admin/(:any)/(:any)'] = 'admin/$1/$2'; $route['admin/(:any)'] = 'admin/$1/$1'; $route['admin'] = 'admin/index';

CodeIgniter mod_rewrite gives 404 error

可紊 提交于 2019-11-29 18:03:49
I have written a CodeIgniter application and I want to use mod_rewrite to clean up my URL's. I have installed the CodeIgniter application in htdocs/ci-intro/ Here is my .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /ci_intro/ #Removes access to the system folder by users. #Additionally this will allow you to create a System.php controller, #previously this would not have been possible. #'system' can be replaced if you have renamed your system folder. RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php?/$1 [L] #When your application folder isn't in the

How to extract get variable from query string in codeigniter?

一曲冷凌霜 提交于 2019-11-29 16:03:07
My issue is i have QUERY_STRING enabled in my codeigniter setup so that links look like this http://www.domain.com/search/index/page/4?squery=searchterm I have a form on this page that uses GET because I can't use POST for what i'm using, when i try to retrieve the "squery" using $this->uri->segment(4) it doesn't return that part only the 4 part. What way can i retrieve the search term ? This is in my htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) index.php?/$1 [L] William Smith Got it to work by doing this Changing my config variables $config

Codeigniter _remap function

烂漫一生 提交于 2019-11-29 00:39:51
Please help I want to use first URI segment into my CodeIgniter website. Like when I open these url they opens my profile: http://www.facebook.com/buddyforever or http://www.myspace.com/zarpio How can I do this with CodeIgniter? I checked _remap function but first coming controller how to hide controller? You can do this using the URL routing of codeigniter... If you want your URL to be http://www.mydomain.com/zarpio and you want it to refer to your_controller , then do the following. /config/routes.php $route['(.*)'] = "your_controller/$1"; // Now, `zarpio` will be passed to `your_controller`

How to extract get variable from query string in codeigniter?

江枫思渺然 提交于 2019-11-28 10:18:10
问题 My issue is i have QUERY_STRING enabled in my codeigniter setup so that links look like this http://www.domain.com/search/index/page/4?squery=searchterm I have a form on this page that uses GET because I can't use POST for what i'm using, when i try to retrieve the "squery" using $this->uri->segment(4) it doesn't return that part only the 4 part. What way can i retrieve the search term ? This is in my htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule