.htaccess图像在重写后未显示 [英] .htaccess images not showing after rewriting

查看:114
本文介绍了.htaccess图像在重写后未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题,URL已被这样重写

I have a problem, URL's have been rewritten like this

RewriteEngine on
RewriteCond %{REQUEST_URI} !index.php
RewriteRule ^(.*)$ index.php?test=$1 [NC,L]

我的图像均未应用,css样式均未应用。我已经尝试过< base href = /> ,但是它不起作用。

None of my images, nor css styles are being applied. I have tried <base href="/">, but it is not working.

任何解决方案?

推荐答案

尝试一下

RewriteEngine on
RewriteCond %{REQUEST_URI} !index.php
## if the request is not for a valid file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?test=$1 [NC,L]

这篇关于.htaccess图像在重写后未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆