Here is wordpress .htaccess
file:
# 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
Is <IfModule mod_rewrite.c></IfModule>
to check whether mod_rewrite
module has been loaded on server? Also if <IfModule mod_rewrite.c></IfModule>
is for mod_rewrite
then why does <IfModule mod_rewrite.c></IfModule>
uses mod_rewrite
instead of mod_rewrite.c
? Is it referring to source file as mentioned here:
You can read here: http://httpd.apache.org/docs/2.4/en/mod/core.html#ifmodule
Syntax:
And it’s
mod_rewrite.c
orrewrite_module
for Apache Module mod_rewrite.http://httpd.apache.org/docs/current/mod/core.html#ifmodule
http://httpd.apache.org/docs/2.2/mod/module-dict.html#SourceFile
In laymans yes the IfModule condition checks if a module is loaded. Yes mod_rewrite.c is the Source file.