# BEGIN
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END
I am a beginner in htaccess , so does any one help me to describe what is that lines means?
A little more in detail:
<IfModule mod_rewrite.c>The contents of a
<IfModule>block are only processed if the condition is true. In this case the enclosed directives are only processed if the module mod_rewrite is loaded.RewriteEngine OnRewriteEngine Onis needed to enable the rewriting engine for that directory and its subdirectories.RewriteBase /RewriteBase /sets the per-directory base URL path to/. But this is only necessary if the URL path is not the physical path.RewriteCond %{REQUEST_FILENAME} !-fThis condition states that the requested filename (the requested URL path mapped to the file system) must not be a regular file.
RewriteCond %{REQUEST_FILENAME} !-dThe same as the previous but it must not be an existing directory.
RewriteRule . /index.php [L]This rule will match any non empty URL path (more precisely: the requested URL path without the base URL path) and substitutes it with
/index.phpif the corresponding conditions both are true. Additionally it is flagged as the last rule, so when the rule is applied, the current rule processing will stop here.</IfModule>Counterpart to
<IfModule …>.