April 20, 2012

Using .htacces to run a .ics file as a .php file

Question by bhooks

I’m tyring to use .htaccess to run a .ics file as a .php file so that I can use the PHP code to create a calendar, that will then be recognized by devices like iPhones or programs like Microsoft Outlook since it’s file extension is .ics. I haven’t been able to get it to work so came here to see if someone could help.

.htacces code:
AddHandler application/x-httpd-php5 .ics

I’m not sure if it’s an error with .htaccess or with something in the PHP code, so if I need to post the PHP code please let me know. Thanks!

Answer by Starx

Like this

AddHandler application/x-httpd-php5s .ics

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!