index.php使用此命令:“<script src="/jquery.min.js"></script>
”并且htacess不起作用,结果:http://haluze.eu/obrazky/
index.php:“<script src="/jquery.min.js"></script>
”与htacess完美配合
我的htacces测试:
Options -Indexes
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} www.haluze.eu$
RewriteRule (.*) http://haluze.eu/$1 [R=301,QSA,L]
RewriteRule ^obrazky/(.*) index.php?s=pic$1
你能帮帮我吗? :)
我迷路了...
答案 0 :(得分:0)
您需要从重写规则中排除文件/目录。
试试这段代码:
Options +FollowSymlinks -Indexes -MultiViews
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(haluze\.eu)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^obrazky/(.*)$ index.php?s=pic$1 [L,QSA,NC]
答案 1 :(得分:0)
第一个解决方案(可能)
尝试在jquery文件的路径中添加一个点
<script src="./jquery.min.js"></script>
解决方案二 使用jQuery CDN,降低对服务器的请求
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>