Enable & Setup mod_rewrite Apache / 2.2.3 (CentOS) Server (httpd.conf settings)

After I installed LAMP on a web server ( 5.6 / 2) of We found that although the module mod_rewrite is enabled, pages must comply with the mod_rewrite could not be accessed.

Not Found - The requested URL / was not found on this rewrite_url.html server. "

Enable mod_rewrite in Apache / 2 (CentOS) Server.

1. After installing the httpd (Apache), open the file / Etc / httpd / conf / with an editor (nano / etc / httpd / conf / httpd.conf) And check first if the module "mod_rewrite.so"Is found in DSO (Dynamic Shared Object). Should find the line "Rewrite_module LoadModule modules / mod_rewrite.so"No character"#"In front. If this character should be removed and will be added if the line is missing.

loadmodule_mod_rewrite

2. We leave open the editor and search httpd.conf (Ctrl + W to search in nano) line that's Directive "AllowOverride None". You will have to change from "AllowOverride None"In"AllowOverride All"

allowoverwrite

3. Ctrl + X and Y to save changes made to the file httpd.conf.

4. Httpd restart

service httpd restart or /etc/init.d/httpd restart

Now everything should work OK. Do not forget to add in the site root folder file .htaccess lines:

RewriteEngine On
RewriteBase /

Enable mod_rewrite in Apache & Setup / 2.2.3 (CentOS) Server.

Enable & Setup mod_rewrite Apache / 2.2.3 (CentOS) Server (httpd.conf settings)

About the author

Stealth LP

Founder and editor Stealth SettingsIn 2006 date.
Experience on Linux operating systems (especially CentOS), Mac OS X, Windows XP> Windows 10 and WordPress (CMS).

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment is processed.