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

How to install and use optipng on Linux CentOS

What is the spaceship operator (<=>) in PHP?

Remove trailing slash (redirect to remove trailing slash) in .htaccess

How to find out what version of Laravel you are using?

What is the difference between empty(), isset(), != null, is_null() in PHP

How to block multiple IP addresses in .htaccess

How to check if a (blade) view file exists

How to block IPv6 IP addresses in .htaccess

How to convert between types in JS?

What are generators in PHP, and how do they compare to arrays?