dora0817
dora0817
2016-11-14 08:58

重写规则不适用于css,js和图像

  • php

⁠⁠⁠File structure:

htdoc
|--project
   |--admin
      |--css
      |--js
      |--images
      |--.htaccess
      |--index.php

.htaccess file contain:

RewriteEngine on
RewriteBase /project/admin/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?PATH_INFO=$1 [L,QSA]

When I going through the following link every thing is working properly.

localhost/project/admin/profile

But when I going through the following link the css js and images are not loading

localhost/project/admin/profile/

Index.php the css link is like that

href="css/style.css"

Please help.

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答