开发者

ICS extension as PHP with Apache2

开发者 https://www.devze.com 2023-02-12 04:34 出处:网络
I am trying to serve up an ics (ical) file via a url. Accessing my \"ical.php\" is fine. B开发者_如何转开发ut many apps insist the url has a .ics extension. If I symlink \"shamrock.ics\" to ical.php t

I am trying to serve up an ics (ical) file via a url. Accessing my "ical.php" is fine. B开发者_如何转开发ut many apps insist the url has a .ics extension. If I symlink "shamrock.ics" to ical.php then the raw php file is served up. I found a rewrite rule elsewhere in stackoverflow (RewriteRule ^(.*).ics$ $1.php [QSA]) but this doesnt work for me (other rewrites I use do work so I know the rewrite engine works).

Can someone suggest the next step or the best path to take to solve this.


I found the solution. And its not using rewrites. Simply add "AddType application/x-httpd-php .php .phtml .html .htm .ics" to the httpd.conf. I should have found that.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号