简体   繁体   English

如何将Codeigniter网站从实时服务器集成到本地服务器

[英]How to integrate codeigniter website from live to local server

I have a website source code which is built in codeigniter. 我有一个内置在codeigniter中的网站源代码。 I am trying to setup it into local wamp server but not working properly. 我正在尝试将其设置到本地Wamp服务器中,但无法正常工作。

I have done following things: 我已经做了以下事情:

  1. Create a database UTF-8 with database name "fc2" and import live server database. 创建数据库名称为“ fc2”的数据库UTF-8,并导入实时服务器数据库。
  2. Configure aplications/config/config.php by setting base_url. 通过设置base_url来配置aplications / config / config.php。
  3. Configure aplications/config/database.php by set databse host,username,password and database name. 通过设置数据库主机,用户名,密码和数据库名称来配置aplications / config / database.php。

But its not working. 但是它不起作用。 (Screen Shot attached). (附有屏幕截图)。

在此处输入图片说明

.htaccess file looks like this .htaccess文件看起来像这样

在此处输入图片说明

Please help me for this issue. 请帮我解决这个问题。

Thanks in advance 提前致谢

try in .htaccess 尝试.htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_URI} ^sys.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_URI} ^app.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

assumming that index.php is your index page. 假设index.php是您的索引页面。

and sys is your system folder and app is your application folder. sys是您的系统文件夹, app是您的应用程序文件夹。

and change in config.php 并更改config.php

$config['index_page'] = '';

the problem I think is with the htaccess. 我认为问题是htaccess。 Try this 尝试这个

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /FOLDER_NAME/index.php?/$1 [L]

change FOLDER_NAME with the name of the local directory. 将FOLDER_NAME更改为本地目录的名称。

检查是否已使用“ http://”将基本URL放在config.php文件中。如果未输入“ http://”,请检查

Please try this: 请尝试以下方法:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /folder_name/index.php?/$1 [L]

Also check if php installed properly in the stack. 还要检查php是否在堆栈中正确安装。

Maybe reinstalling the WAMP stack might help. 也许重新安装WAMP堆栈可能会有所帮助。

Alternately I would be curious to check maybe in XAMPP to see if its something with the wamp. 或者,我很想检查XAMPP中的内容是否与WAMP有关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将Codeigniter网站从实时服务器集成到本地服务器 - integrate codeigniter website from live to local server 从本地服务器上载Codeigniter网站到现场 - Uploading codeigniter site from local server to live 找不到Codeigniter网站在实时服务器页面上运行 - Codeigniter website not working on live server page not found 单击本地链接时,codeigniter 网站会打开实时网站 - codeigniter website opens live website when links on local is clicked 实时服务器显示404错误,但不在本地,codeigniter 3上 - live server shows 404 error, but not on local, codeigniter 3 Codeigniter本地主机重定向到实时服务器 - Codeigniter local host redirects to live server 如何从本地服务器发送 Mysql 更改到在线实时服务器 - How to send Mysql changes from local server to online live server Drupal网站从实时服务器到本地服务器的迁移显示断开的链接 - Migration of Drupal website from live server to local server shows broken links Codeigniter 网站在 Google Virtual Instant Live Server 上显示错误 404 - Codeigniter website showing error 404 on Google Virtual Instant Live Server Codeigniter网站,在实时服务器上输出数据库生成数据库错误 - Codeigniter website with out database generating database error on live server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM