Home >Backend Development >PHP Tutorial >.htaccess Rewrite后css&js错误
这是我的.htaccess文件
<code># BEGIN qiaoyixuan <ifmodule mod_rewrite.c> RewriteEngine on RewriteBase /qiaoyixuan/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </ifmodule> # END qiaoyixuan </code>
我希望所有地址请求都被Rewrite到index.php,
当请求http://localhost/qiaoyixuan/2015时页面正常显示,
当请求http://localhost/qiaoyixuan/2015/(多一个‘/’)时,css和js出现错误
求解答,谢谢!
这是我的.htaccess文件
<code># BEGIN qiaoyixuan <ifmodule mod_rewrite.c> RewriteEngine on RewriteBase /qiaoyixuan/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </ifmodule> # END qiaoyixuan </code>
我希望所有地址请求都被Rewrite到index.php,
当请求http://localhost/qiaoyixuan/2015时页面正常显示,
当请求http://localhost/qiaoyixuan/2015/(多一个‘/’)时,css和js出现错误
求解答,谢谢!
页面里面引用css和js的时候 没以 /
开头?