The rewrite rule mod_rewrite does not work

I have confirmed on my host that mod_rewrite is enabled. I want incoming requests to be rewritten for transfer to the mod_rewrite.php file in my root directory. Mod_rewrite doesn't seem to work at all. Here is the code in my .htaccess file:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^/(.*)$ /mod_rewrite.php?vpath=$1 [L,QSA]
</IfModule>
+5
source share
1 answer

Here is what you need to do:

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /
  RewriteRule ^(.*)/?$ mod_rewrite.php?vpath=$1 [L,QSA,NC]
</IfModule>
+4
source

All Articles