Codeigniter项目没有运行除XAMP以外的其他AMP服务器


Codeigniter project is not running other AMP server except XAMP

我的codeIgniter项目在Xamp 1.7.3中运行良好,但不能在任何其他本地服务器(例如Easy PHP, WAMP等)上工作。

我的httaccess文件

# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
DirectoryIndex index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml index.htm home.htm default.htm index.fcgi default.html
# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ /pwame/index.php/$1 [L]

你的。htaccess不能在WAMP服务器上工作。用下面的

修改config.php中的基本url
$config['base_url']='http://localhost/yourproject/index.php/';

这是一个奇怪的htaccess,但是不管怎样。

你是否激活了Apache rewrite_module,默认情况下我认为它没有被激活

左键点击系统托盘中的wamp管理器图标-> Apache -> Apache Modules -> rewrite_module

在菜单列表中找到它,如果它没有被选中,点击它,等待10秒让Apache重新启动,然后你就可以开始了