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
webdevetc

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



More...


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 can you check if a variable is alphanum (alphanumeric, letters and numbers only) in PHP?

How to set the Expires header in .htaccess

How to hide certain file types from directory listings

How to convert between types in JS?

What is WordPress default Apache .htaccess rules?

How to convert a string to an array of it's characters in PHP?

How to exclude URLs from the Laravel CSRF protection?

How to set up custom error pages in .htaccess for your Apache server (ErrorDocument)

How to prevent Eloquent from adding created_at or updated_at timestamps?

How to find out which php.ini file PHP is using?