Wednesday, January 28, 2015

How to Enable mod_rewrite in Apache Server

<h3>How to Enable mod_rewrite in Apache Server</h3>
<ol>
<li>Before you begin this, <strong>please make sure you make a backup copy</strong> of the original file in case you make a mistake, this way you can always go back to the original configuration - always backup before you begin doing something like this.)</li>
<li>Find the <strong>httpd.conf</strong> file (usually you will find it in a folder called conf, config or something along those lines. In Fedora you can find it at <strong>/etc/httpd/</strong> directory.)</li>
<li>Inside the httpd.conf file find and uncomment the line <strong><em>LoadModule rewrite_module modules/mod_rewrite.so</em></strong> (remove the pound '#' sign from in front of the line - the # sign is for comments, by removing the # sign, you are uncommenting the line)</li>
<li>Also find the line <strong><em>ClearModuleList</em></strong> is uncommented then find and make sure that the line <strong><em>AddModule mod_rewrite.c</em></strong> is not commented out. (I didnt find these in Fedora, yet my mod_rewrite works great)</li>
<li>After you have made the changes and saved them, restart your httpd (apache) server for the changes to take affect. The easiest way to do this is to go to the shell command and type: <strong>/etc/init.d/httpd restart</strong> (this works for Fedora, might be different for other distributions!)</li>
<li>Done</li>
</ol>

No comments:

Post a Comment

Change priority of dual boot OS

Change priority of dual boot OS  (Windows and Linux): Go to your Linux OS, install Grub customizer. Then change priority by up and down arro...