codeigniter htaccess以及配置上传到网站服务器时,
我有一个服务器,我做了使用codeigniter网站。我用了瓦帕服务器做我的项目。现在我想将它上传到服务器,我有我需要改变配置和htaccess文件。但我不知道编辑这些文件的内容。
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.
自动加载:
我已经在这个文件中什么也没有改变只
$自动加载['图书馆'] =阵列(数据库,会话,form_validation');
$自动加载['帮手'] =阵列(URL,形式,数组,日期);
autoload:
I have changed nothing in this file only
$autoload['libraries'] = array('database','session','form_validation');
$autoload['helper'] = array('url','form','array' , 'date');
配置:
$配置['BASE_URL'] ='http://www.example.com/';
$配置['uri_protocol'] ='自动';
config:
$config['base_url'] = 'http://www.example.com/';
$config['uri_protocol'] = 'AUTO';
数据库:
$分贝['默认'] ['主机'] ='http://www.example.com';
database:
$db['default']['hostname'] = 'http://www.example.com';
路线:
$航线['(:任何)] ='my_controller / $ 1';
$航线['default_controller'] =my_controller;
$航线['404_override'] ='';
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
服务器需要一定的时间不同htacess
Server requires some times a different htacess
我发现有很多不同的htaccess的主目录下的实例链接 https://github.com / riwakawebsitedesigns / htaccess_for_ codeigniter
I have found a link with lots of different htaccess main directory examples https://github.com/riwakawebsitedesigns/htaccess_for_codeigniter
这也许能帮助你。