I have enabled/uncommented the loading of the mod_rewrite module in the httpd.conf file, and as far as I understand it, all that should need to be done after that is to add the following lines at the right location in the Apache config:
- Code: Select all
RewriteEngine on
RewriteRule ^/?testtest/.* /test.php
(i.e. this test rule should rewrite all accesses to the URLs "http://localhost/testtest/*" to the URL "http://localhost/test.php")
I have also tried the "L" flag to rule out any strange other rewrites happening after my rewrite, as follows, but with no different results:
- Code: Select all
RewriteEngine on
RewriteRule ^/?testtest/.* /test.php [L]
The key words here I guess are "at the right location", because I have tried to insert those lines more or less everywhere, inside individual "Directory" directives and in the last lines of the httpd.conf file, but nothing seems to work? (yes, I restart Apache after each configuration change too)
I don't have any VirtualHost directives defined anywhere in the config except the default "VirtualHost default:443" in "httpd-ssl.conf" (i.e. neither in "httpd.conf" nor "httpd-vhosts.conf"), since I only run a single instance and want these rules to apply everywhere.
So, to summarize it: In a default XAMPP installation (on Windows, if it matters), what is the minimal steps to get a global mod_rewrite rule working, e.g. the test rule listed above (and WITHOUT using any .htaccess files, as explained above)?