How to enable mod_rewrite in xampp and also check mod_rewrite is enabled or not ?

How to enable mod_rewrite in xampp and also check mod_rewrite is enabled or not
Reading Time: 1 minute

Today I will show you how to enable mod_rewrite in xampp. This is useful when we have to rewrite the URL. generally for SEO purpose, we want SEO friendly URL. Converting the normal URL to SEO friendly URL will need to enable mod_rewrite.

Steps to Enable mod_rewrite in xampp

  1. Go to the directory where xampp is installed C:\xampp\apache\conf.
  2. Open and edit httpd.conf in a text editor
  3. find this line in httpd.conf file.
  4. After finding this line, replace this line by this text.
  5. Find this text AllowOverride None and replace this text with AllowOverride All. It will appear one or two times.
  6. After doing all these changes. Restart the apache server.
  7. To check if mod_rewrite is installed or not write this code phpinfo(); in any file and see the output.
  8. The output will look like the below image. In the loaded module, you can see mod_rewite.

mod_rewrite output

 

If you are facing any issue please mention in the comment section.

Leave a Reply

Your email address will not be published. Required fields are marked *