我正在使用我自己的MVC php在一个项目中工作,我从url中获得了要调用的控制器和方法,它调用了正确的控制器和正确的方法,但它没有加载css和javascript代码。
例如,当我访问mysite/public/ home /index时,它会调用控制器home和方法index。但是它尝试从mysite/public/home/ css /mystyle.css加载css,而我的css在mysite/public/css/mystyle.css中
这是我的目录
// this is my index.php in the public folder
<?php
require_on
目前,我尝试删除codeigniter url上的index.php。我在localhost/jqm/withci上安装了我的codeigniter。然后,我编写了.htaccess来删除index.php,它工作得很好。.htaccess文件:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /jqm/withci/index.php/$1 [L]
但是Im having some problem, my css file and js wont load..我的控制者是
在重定向页面时,index.php并不是默认加载的,所以我在htaccess文件中尝试了下面的代码。我已经安装了php 5.3.10、apache服务器和postgres数据库。因此,如果除了更改.htaccess和httpd.conf之外,任何新的配置都必须完成,那么请告诉我。我见过以前就同一问题提出的问题,从这些问题中我提到了所有问题,但我仍然无法解决这个问题。请告诉我要做什么额外的事情。
.htaccess文件
<IfModule mod_rewrite.c> RewriteEngine On #Checks to see if the user is attempting