不工作我使用PHP和Apache服务器的工作,我想重写sites/all/themes/chap2014/fpd/gift.php
到fdp/gift
和sites/all/themes/chap2014/fpd/another.php
fdp/another
正是我想要做到这一点重写URL在PHP
重写sites/all/themes/chap2014/fpd/*.php
到fpd/*
重写模式启用,我在.htacess
文件中尝试下面的代码。
RewriteEngine on
RewriteRule ^fpd/?$ sites/all/themes/chap2014/fpd/$1.php
但是什么都没有发生,实现这个目标的正确方法是什么?
得到任何帮助,
我尝试这一点,但什么都没有发生在 重写规则^ FPD /([^ /] +)/ $ 'RewriteEngine叙述? /sites/all/themes/chap2014/fpd/$1.php [L,NC]' – zhilevan
我测试你的规则在http://martinmelin.se/rewrite-rule-tester/ 与此网址'网站/所有/主题/ chap2014/fpd/tshirt.php'但被告知不匹配 – zhilevan
1.切勿在该网站上测试,因为它不可靠。 2.你需要输入你的URI为'http:// example.com/fpd/tshirt.php',它将被内部转发到'http://example.com/sites/all/themes/chap2014/fpd/tshirt .php' – anubhava