How to enable the rewrite engine in .htaccess?

Apache: How to enable the rewrite engine in .htaccess?

Before you can use rewrite rules in .htaccess you must enable the rewrite engine.

To enable the rewrite engine in .htaccess you must add this to your .htaccess file:

  1. RewriteEngine On

webdevetc profile pic

I am a 29 year old backend web developer from London, mostly focusing on PHP and Laravel lately. This ( is my blog where I write about some web development topics (PHP, Laravel, Javascript, and some server stuff). contact me here.


Comments and discussion about How to enable the rewrite engine in .htaccess?

Found this interesting? Maybe you want to read some more in this series?

Or see other topics in the Apache language

Or see other languages/frameworks:
PHP Laravel Composer Apache CentOS and Linux Stuff WordPress General Webdev and Programming Stuff JavaScript
Or see random questions

What is the difference between ( for ... in ) and ( for ... of ) in javascript?

How to add the CSRF (Cross-site request forgery) token in Laravel?

How to block access to certain referrers in Apache using .htaccess

What kind of database field type should you (normally) use for foreign keys?

Set PHP config Variables (like ini_set) with .htaccess

How to Extract Query String (from a URL) Into an Associative Array in PHP

What are the main error types in PHP

How to find the average value of items in a Laravel Collection?

Force trailing slash (redirect if no trailing slash exists) in .htaccess

How to use Anonymous classes in PHP 7?