0
我想重写PHP文件为.xml目录rss/index.php
文件及其子目录rss/all/index.php
和rss/main/index.php
等sub directories
而已,我不想影响其他来.XML使用此规则的网站中的目录。国防部重写.PHP在目录及其子目录只
即
root/rss/index.php to root/rss/index.xml
和
root/rss/all/index.php to root/rss/all/index.xml
我不知道国防部重写了,我想这种方式,但它什么都不做。
RewriteRule ^/rss/.xml$ $1.php [L]
also tried like this
RewriteRule ^(rss).xml$ $1.php [L]
请参阅并建议任何可能的方法来做到这一点。
谢谢。
我得到404页面没有找到错误这种方式,页面url http:// localhost/Site/rss/index.xml' – 2013-02-27 08:09:44
@TallboY在你的问题,你要求'root/rss/all/index .php到root/rss/all/index.xml',你确定你不是指相反的? – 2013-02-27 08:12:05
我想重写index.php到rss /和rss/sub-directories /中的index.xml,就像你说的/rss/something.xml一样,它们会被送到/rss/something.php – 2013-02-27 08:23:52