

# It can be "All", "None", or any combination of the keywords:īonus Read : How to Set Apache Headers Conditionally

# AllowOverride controls what directives may be placed in. htaccess file in Apache, look for section and change the AllowOverride directive from None to All. htaccess file allows you to set up URL rewrite and redirection rules without changing Apache configuration file. If you don’t find the above line, just add it to the file LoadModule rewrite_module modules/mod_rewrite.soīonus Read : How to Redirect Page to Another Domainģ. If # is not present at the beginning, it means mod_rewrite is already enabled Look for the line #LoadModule rewrite_module modules/mod_rewrite.soĪnd remove the # sign at its beginning, to enable mod_rewrite LoadModule rewrite_module modules/mod_rewrite.so If mod_rewrite is not enabled then open Apache’s default configuration file $ sudo vi /etc/httpd/conf/nf It means mod_rewrite is already enabled in your CentOS linux.īonus Read : How to Redirect Domain Without Changing URL If you see the output as: rewrite_module (shared) Open terminal and run the following command to check if mod_rewrite is already enabled in your system $ httpd -M | grep rewrite Check if mod_rewrite is already installedĬentOS 7 and later versions have mod_rewrite installed and enabled by default. Here are the steps to enable mod_rewrite for Apache in CentOSġ. How To Enable mod_rewrite For Apache in CentOS Here’s how to enable mod_rewrite for Apache in CentOS, Fedora, Redhat Linux and other platforms. Mod_rewrite is a useful Apache module that helps you rewrite URL and redirect pages in Apache web server.
