【发布时间】:2015-07-28 11:49:23
【问题描述】:
我有 url public/l/img/logo.png,我想在我的公共目录中使用 htaccess 查看public/img/logo.png。
我试过用这个,但它不起作用
RewriteRule ^l/(.*)$ $1 [R=301,L]
我现在的htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
我的公众是真正的目录 提前致谢
【问题讨论】:
-
“公共是真正的目录”实际上是指它是 DOCUMENT_ROOT?另见Tips for debugging .htaccess rewrite rules
标签: javascript php regex apache .htaccess