以下是wordpress .htaccess文件:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress<IfModule mod_rewrite.c></IfModule>是否检查mod_rewrite模块是否已加载到服务器上?另外,如果<IfModule mod_rewrite.c></IfModule>是用于mod_rewrite的,那么为什么<IfModule mod_rewrite.c></IfModule>使用mod_rewrite而不是mod_rewrite.c?它是否引用了前面提到的这里源文件?

发布于 2015-08-12 07:20:10
你可以在这里读到:http://httpd.apache.org/docs/2.4/en/mod/core.html#ifmodule
语法:
<IfModule [!]module-file|module-identifier> ... </IfModule>它是ApacheModulemod_rewrite的mod_rewrite.c或rewrite_module。
发布于 2015-08-12 07:30:18
http://httpd.apache.org/docs/current/mod/core.html#ifmodule
<IfModule test>...</IfModule>部分用于标记以特定模块的存在为条件的指令。只有当测试为真时,部分中的指令才会被处理。如果测试为假,则忽略起始标记和结束标记之间的所有内容。 模块参数可以是模块标识符,也可以是模块编译时的文件名。例如,rewrite_module是标识符,mod_rewrite.c是文件名。
http://httpd.apache.org/docs/2.2/mod/module-dict.html#SourceFile
源文件 这非常简单地列出了源文件的名称,该源文件包含模块的代码。这也是
<IfModule>指令使用的名称。
在外行人中,是的,IfModule条件检查是否加载了一个模块。是的,mod_rewrite.c是源文件。
https://stackoverflow.com/questions/31957893
复制相似问题