Software not seeing "mod_rewrite" enabled

Operating system: Debain
OS version: 10

I have a piece of software that is not seeing mod_rewrite as being enabled.

I read several other forum issues on this, but most are very old and some went unanswered, so I am looking for a definitive answer on how I can get the software to see this as enabled to allow for rewrites of the URL to a SEO friendly structure.

This is technically the only virtual server on the machine at this time, if that matters from a security perspective, I am not sure.

I propose you simplify and test.

Simplify by creating a new virtual server for testing, so that the production virtual server is unmolested while you test.

In the virtual server for testing, create a .htaccess file and a PHP file to determine if mod_rewrite is indeed functioning normally.

In webroot, create a .htaccess file, thus:
RewriteEngine On
RewriteRule ^.*$ mod_rewrite.php

in webroot, create a PHP file thus:
<?php echo "Mod_rewrite is activated!"; ?>

Then visit the URL of the virtual server for testing. What do you see?

An error? The default Virtualmin page? Then use the powerful mantra of ancient Indian sages to enable mod_rewrite, which is:
sudo a2enmod rewrite

1 Like

Thanks for the reply @calport. I was able to test and verify using the method you outlined here. Even did it on the same virtual server, yet the script does not see it as being active.

Are there any other settings in Apache that would keep this from showing up for the script?

Please clarify: does the simple test confirm Mod_rewrite is activated!? If so, mod_rewrite is working normally and the issue is entirely with your ‘piece of software’ / script.

The logs might offer a clue about what the problem is with the script.

The test does confirm that.

I am thinking maybe it has something to do with the way the security works with the virtual servers?

I do not see anything in the error logs, since there is no error, just the script not detecting it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.