Can anyone explain what this mod_rewrite rule is doing?
I’m trying to comment the file, but the code seems to state the opposite of what I think it’s doing
# Enable rewriting of URLs RewriteEngine on # Allow specified file types to be accessed # Thing to test = URL # Condition = not starting with RewriteCond $1 !^(index\.php|images|css|js|robots\.txt) # RewriteRule will only be performed if the preceeding RewriteCond is fulfilled # Remove index.php from all URLs # Pattern = anything (0 or more of any character) # Substitution = index.php + the rest of the URL RewriteRule ^(.*)$ /index.php/$1 [L]
The $1 in the second part is replaced by the group in the first part.
Is this a Symfony rule? The idea is to pass the whole query string to the index.php (the front controller) as a parameter, so that the front controller can parse and route it.