How to enable mod_rewrite on apache set-up installations

Hello,

I’ve installed an apache server site, with PHP 5.6 and MySQL 5.6. Uploading a phpinfo file with <?php phpinfo(); ?> I can’t find the mod_rewrite loaded. How can I activate it?

1 Like

I just tried the following on a new Apache install:

created an .htaccess file inside the WordPress web-root:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$ http://google.com [R=301,L]`

Saved and opened my Local site and it redirected to Google. Rewrite is available out-of-the-box.
3 Likes

The problem was with my script. Thanks.

1 Like

Info:
If you set up the site by default with nginx and change then to apache, the rewrite via .htaccess did not work for me.
But creating a new site with apache directly does work.

Maybe a bug in local?

1 Like