Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using cPanel to host my website. I need to enable 'mod_rewrite' on this Shared Hosting cPanel account to run my script. I've tried to Google the solutions high and low but did not find any luck yet.

Those tutorials that I found only work well with VPS and some of them said that, only hosting provider can change and enable it. But, some of them said that, it can be done easily by editing the .htaccess file.

My question: If I want to edit the .htaccess file, what should I include in that file? What the 'rules' and 'conditions' that should be included?

share|improve this question

cPanel is not inherently involved here, by the way.

Do you actually know if you're allowed to do this? Not all hosts allow such config changes via .htaccess. You should probably contact support to check.

If you already know it's possible, you can add:

RewriteEngine On 

to your .htaccess file. Just put it near the top so it's before any rewrite rules.

share|improve this answer
Options +FollowSymLinks must also be enabled, if it not already. – w3dk Nov 24 '12 at 23:18
Ok @Su'. Thanks guys! Really helpful. – Zulhilmi Zainudin Nov 30 '12 at 13:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.