Home / Tutorials / Enable mod_rewrite in Linux localhost

Enable mod_rewrite in Linux localhost

Sometime we face issue that apache settings doesn’t work on localhost. So this time we need to enable mod_rewrite extension. Here is steps how to enable:

1. Activate the mod_rewrite module with

2. Restart the apache

To use mod_rewrite from within .htaccess files (which is a very common use case), edit the default VirtualHost with

3. Modify apache config

Search for “DocumentRoot /var/www/html” and add the following lines directly below:

Save and exit the nano editor via CTRL-X, “y” and ENTER.

Restart the server again:

About cmadmin

Web Developer & Designer | Android App Developer

Login


Username
Create an Account!
Password
Forgot Password? (close)

Sign Up


Username
Email
Password
Confirm Password
Want to Login? (close)

Forget Password?


Username or Email
(close)
SHARE
OR
SUBSCRIBE
To get latest new / tutorial / technology / development information subscribe with us.
ARE YOU READY? GET IT NOW!
Lets Get Updated with latest trends & tutorials!
Your Information will never be shared with any third party.
Ready for latest tutorials & tools !
OR SUBSCRIBE WITH