Welcome Guest, Not a member yet? Register   Sign In
using php to generate xml wml pages, and how to do it in CodeIgniter?
#1

[eluser]searain[/eluser]
In traditional php

I use .htaccess like this
Code:
<Files mysiterss.xml>
ForceType application/x-httpd-php5
</Files>
to tell my server, run "mysiterss.xml" as a php file, and generate the xml page.

Now in CodeIgniter, I want this url to show .xml extension, which would be used in xml rss feed etc.

$config['url_suffix'] = ".xml";

That will add ".xml" to all the urls.

But all I want is certain page, such as only this page mysitesrss is with .xml extension, how should I do that?

Thanks!
#2

[eluser]searain[/eluser]
Any help?

I simplify my original post to make it clear and CI focused.

Or in CodeIgniter, I don't have to give rss feed page .xml extension like

http://www.mysite.com/feed.xml

I can just use

http://www.mysite.com/feed

as long as I set up the page header and content right?
#3

[eluser]garymardell[/eluser]
As long as you send the right headers then page content can be whatever you want it to be. I have an api that has the xml headers and just echos the xml contents. Similar thing for you really.
#4

[eluser]searain[/eluser]
Thanks! I tried that with wml samples. Yes, set the header right and extension .php will be working fine with wap application same as .wml extension.




Theme © iAndrew 2016 - Forum software by © MyBB