【问题标题】:.htaccess images not showing after rewriting.htaccess 图像在重写后不显示
【发布时间】:2013-05-04 21:26:04
【问题描述】:

我有一个问题,网址已经被改写成这样

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

没有应用我的图像,也没有应用 css 样式。我试过<base href="/">,但它不起作用。

有什么解决办法吗?

【问题讨论】:

    标签: image .htaccess rewrite


    【解决方案1】:

    试试这个

    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]
    

    【讨论】:

      猜你喜欢
      • 2015-10-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-07
      • 1970-01-01
      相关资源
      最近更新 更多