Home > Backend Development > PHP Tutorial > .htaccess Rewrite后css&js错误

.htaccess Rewrite后css&js错误

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:21:25
Original
1558 people have browsed it

这是我的.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>
Copy after login
Copy after login

我希望所有地址请求都被Rewrite到index.php,
当请求http://localhost/qiaoyixuan/2015时页面正常显示,
当请求http://localhost/qiaoyixuan/2015/(多一个‘/’)时,css和js出现错误
.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>
Copy after login
Copy after login

我希望所有地址请求都被Rewrite到index.php,
当请求http://localhost/qiaoyixuan/2015时页面正常显示,
当请求http://localhost/qiaoyixuan/2015/(多一个‘/’)时,css和js出现错误
.htaccess Rewrite后css&js错误
求解答,谢谢!

页面里面引用css和js的时候 没以 / 开头?

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Apache automatically stops
From 1970-01-01 08:00:00
0
0
0
apache restart failed
From 1970-01-01 08:00:00
0
0
0
apache error
From 1970-01-01 08:00:00
0
0
0
How apache logs
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template