Ibe*_*dia 11 xampp mod-expires
我有XAMPP,我可以在路径下看到mod_expires.so文件
... XAMPP\apache的\模块\ mod_expires.so
但是,我认为该模块没有加载有两个原因:
第一:调用phpinfo()时未列出mod_expires
第二,是我将缓存时间线添加到.htaccess文件中我得到500服务器错误
(.htaccess中的缓存代码示例
<IfModule mod_expires.c>
# Activate mod_expires for this directory
ExpiresActive on
#HTML documents are good for a week from the time they were changed
ExpiresDefault M604800
</IfModule>
Run Code Online (Sandbox Code Playgroud)
两个问题那么:
是否存在指示模块已安装的mod_expires.so文件?
如果是,我该如何启用或激活?
如果不是,我如何在XAMPP中安装和启用?
谢谢,
Ibe*_*dia 20
要加载expires模块,假设它是XAMPP包的一部分,我们需要从apache的配置文件中取消注释LoadModule.
首先检查XAMPP包是否有模块:
转到C:\ XAMPP\apache\module并查找文件mod_expires.so
如果您有此文件,请转到文件C:\ XAMPP\apache\conf\httpd.conf并搜索"mod_expires.so"
你会看见
#LoadModule expires_module modules/mod_expires.so
Run Code Online (Sandbox Code Playgroud)
取消评论此行以便拥有
LoadModule expires_module modules/mod_expires.so
Run Code Online (Sandbox Code Playgroud)
重置服务器
| 归档时间: |
|
| 查看次数: |
9723 次 |
| 最近记录: |