How To Enable mod_rewrite In Wamp And Xampp Server

Are you looking how to enable mod_rewrite in Wamp and Xampp Server? These two are more popular local servers used for website development.

Why Need To Enable mod_rewrite

If you are running a website then it is very important to keep your URL’s SEO-friendly. Your URL’s should be clean and as per search engine recommendation. Keeping page_id, id or something like that in site URL kills your site SEO. Apache module mod_rewrite does a good job for us by keeping our site links optimized for SEO.

The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular expression parser, to rewrite requested URLs on the fly.

Note: If your site is running on hosting server then hosting guys enable rewrite module for your site. If it is not enabled, then you should ask hosting guy to enable it for you.

Enable mod_rewrite In Wamp Server

Step 1 – Start Wamp Server.

Step 2 – Click on the green tray icon.

mod_rewrite

Step 3 – Go to Apache->Apache modules.

mod_rewrite

Step 4 – Scroll down to rewrite module and check it.

mod_rewrite

Step 5 – Restart Wamp Server.

mod_rewrite

Enable mod_rewrite In XAMPP Server

Step 1 – Open XAMPP Control Panel

Step 2 – Open httpd.conf file

mod_rewrite

Step 3 – Find the below line in httpd.conf file and uncomment the line(remove # from beginning of line)

LoadModule rewrite_module modules/mod_rewrite.so

Step 4 – Find all occurences of

AllowOverride None

and replace with

AllowOverride All

Step 5 – Restart XAMPP.

That’s it! I hope you understand how to enable mod_rewrite in Wamp and Xampp Server. For any questions and suggestions please leave a comment below.

If you liked this article, then please subscribe to our YouTube Channel for video tutorials.

1 thought on “How To Enable mod_rewrite In Wamp And Xampp Server

Leave a Reply

Your email address will not be published.