Question

How to activate mod_rewrite in cpanel

Posted April 26, 2021 194 views
ApachePHP

Im installing a script on a cpanel, but it needs me to activate mod_rewrite, how can I activate it?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hi @Samasoul,

As far as I know, mod_Rewrite is installed as an Apache module by default.

httpd -M|grep rewrite
 rewrite_module (shared)

If you let me know the script you are trying to install I might be able to further assist you.

Regards,
KFSys

Hello, @Samasoul

Mod_Rewrite is compiled with Apache by default on cPanel. However, you can still double-check this with the command KFSyS provided already:

  • httpd -M | grep rewrite

You can enable it for an account through the .htaccess file with:

  • RewriteEngine On

Regards,
Alex