简体   繁体   中英

htacess mod_rewrite

I have a page on my site called map-xml.php which is an RSS feed of housing properties. To enable me to submit this to Google's Data Feeds it needs to have an .xml file extension.

So how would I go about writing a rewrite rule in htaccess which would make map-xml.xml work?

Thanks!

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

Should do the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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