How to enable mod_rewrite via .htaccess?

15,996

As per your provided .HTACCESS code, mod_rewrite is already enabled..

RewriteEngine on

While Mod_security can not be enabled/disabled from cPanel end. If you have access to server OR WHM panel then you can do it and make sure you have compiled APACHE to enabl mod_security, otherwise contact your hosting provider to do it for you.

You can find APACHE compile for mod_security details from here...

Share:
15,996
user6276867
Author by

user6276867

Updated on June 04, 2022

Comments

  • user6276867
    user6276867 almost 2 years

    I'm going to enable mod_rewrite (modsecurity ) in Cpanel and here is my htaccess, please advice me how to enable it.

    RewriteEngine on
    RewriteCond $1 !^(index\.php|images|public|assets|uploads|themes|install|updates|asset|mob|robots\.txt)
    RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
    <FilesMatch "\.(jpg|jpeg|png|gif|swf|css)$">
    Header set Cache-Control "max-age=604800, public"
    </FilesMatch>
    

    Thanks in advance