我不知道为什么,但是这个简单的规则不起作用。
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteRule ^rubbellos\.png/$ rubbellos/rubbelbild_png.php [NC,L]
RewriteRule ^rubbellos\.css/$ rubbellos/rubbellos_css.php [NC,L]
</IfModule>
如果我将xyz / rubbellos / rubbelbild_png.php复制到浏览器中就可以了。
我的方法是将rubbellos.png的请求引入.php文件。但是我找不到文件。
提前提示。
您有2个错误:
RewriteBase
因为您正在谈论问题中的子目录/xyz/
。MultiViews
选项可避免与rubbellos
(虚拟文件和现有目录)发生意外行为。您可以在htaccess中将此代码替换为当前代码(必须在/xyz/
文件夹中)
Options -MultiViews
RewriteEngine On
RewriteBase /xyz/
RewriteRule ^rubbellos\.png$ rubbellos/rubbelbild_png.php [L]
RewriteRule ^rubbellos\.css$ rubbellos/rubbellos_css.php [L]
注意:别忘了用xyz
您的真实子目录名称替换
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句