I want to start using Silex on Apache and according to silex docs I need to insert this code into my .htaccess
file
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
#RewriteBase /path/to/app
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
However I already have this code above it, which works fine:
# www.foo.com will point to foo.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.foo\.com$
RewriteRule ^/?$ "http\:\/\/foo\.com\/" [R=301,L]
Can I omit RewriteEngine
on?
Furthermore b.c. rewriting already has been verified to work can I remove the IfModule
statement?
They don't explain what the code does in their docs so any explanation would be helpful.