Codeigniter htaccess and configuration when uploading website to server

浪尽此生 提交于 2019-12-11 20:22:27

问题


I have a server and I made a website using Codeigniter. I used the wamp server to do my project. now I want to upload it to the server I have so I need to change the configurations and the htaccess file. but I don't know what to edit in these files.

autoload: I have changed nothing in this file only $autoload['libraries'] = array('database','session','form_validation'); $autoload['helper'] = array('url','form','array' , 'date');

config: $config['base_url'] = 'http://www.example.com/'; $config['uri_protocol'] = 'AUTO';

database: $db['default']['hostname'] = 'http://www.example.com';

route: $route['(:any)'] = 'my_controller/$1'; $route['default_controller'] = "my_controller"; $route['404_override'] = '';

this is what I have changed in all the configuration files


回答1:


Server requires some times a different htacess

I have found a link with lots of different htaccess main directory examples https://github.com/riwakawebsitedesigns/htaccess_for_codeigniter

This might be able to help you.




回答2:


Here is the step by step tutorial to upload codeigniter app in server. follow the following link. This really helped me. Step By Step guide to Install Codeigniter Website in Server



来源:https://stackoverflow.com/questions/29904621/codeigniter-htaccess-and-configuration-when-uploading-website-to-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!