我用了兄弟连的一个框架brophp,不知各位有用过没。在本地一切OK的了,可是上传到服务器上就不行项目:xs7k本地htaccess如下
RewriteRule ^index.html xs7k/index.php
RewriteRule ^cata/([1-9]\d*).html xs7k/index.php/cata/index/id/$1
.............
http://localhost/xs7k/cata/1.html
对应
http://localhost/xs7k/index.php/cata/index/id/1
OK
.............上传至服务器改为
RewriteRule ^index.html index.php
RewriteRule ^cata/([1-9]\d*).html index.php/cata/index/id/$1
运行:
http://www.xs7k.com/cata/1.html 一直就是在首页 (就是这里有问题,应该相应的转到下面的页面)
http://www.xs7k.com/index.php/cata/index/id/1 这就是正确的
首页是OK的,但是其他就不行了,无论如何都是在首页,出现的提示是: 当前访问的控制器类在项目应用目录下的: ./home/controls/index.class.php 文件!
RewriteRule ^index.html xs7k/index.php
RewriteRule ^cata/([1-9]\d*).html xs7k/index.php/cata/index/id/$1
.............
http://localhost/xs7k/cata/1.html
对应
http://localhost/xs7k/index.php/cata/index/id/1
OK
.............上传至服务器改为
RewriteRule ^index.html index.php
RewriteRule ^cata/([1-9]\d*).html index.php/cata/index/id/$1
运行:
http://www.xs7k.com/cata/1.html 一直就是在首页 (就是这里有问题,应该相应的转到下面的页面)
http://www.xs7k.com/index.php/cata/index/id/1 这就是正确的
首页是OK的,但是其他就不行了,无论如何都是在首页,出现的提示是: 当前访问的控制器类在项目应用目录下的: ./home/controls/index.class.php 文件!
因为上面的是本地的,全部放在xs7k这个文件夹下面而上传到服务器上面不需要前面的xs7k了
我将RewriteRule ^index.html index.php这一句删了,还是一直显示首页在本地显示:当前访问的控制器类在项目应用目录下的: ./home/controls/cata.class.php 文件!
在服务器一直就只显示:当前访问的控制器类在项目应用目录下的: ./home/controls/index.class.php 文件!
我将RewriteRule ^index.html index.php这一句删了,还是一直显示首页在本地显示:当前访问的控制器类在项目应用目录下的: ./home/controls/cata.class.php 文件!
在服务器一直就只显示:当前访问的控制器类在项目应用目录下的: ./home/controls/index.class.php 文件!