简体   繁体   English

htacess mod_rewrite

[英]htacess mod_rewrite

I have a page on my site called map-xml.php which is an RSS feed of housing properties. 我的网站上有一个名为map-xml.php的页面,它是房屋属性的RSS提要。 To enable me to submit this to Google's Data Feeds it needs to have an .xml file extension. 为了使我能够将其提交到Google的数据Feed,它必须具有.xml文件扩展名。

So how would I go about writing a rewrite rule in htaccess which would make map-xml.xml work? 那么我将如何在htaccess中编写一个重写规则,使map-xml.xml起作用?

Thanks! 谢谢!

RewriteRule ^(.*)/map-xml.xml$ /$1/map-xml.php [L] RewriteRule ^(。*)/ map-xml.xml $ /$1/map-xml.php [L]

Should do the trick. 应该做到的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM