Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mod_rewrite rewrite rule is not working

I have confirmed with my host that mod_rewrite is enabled. I want incoming requests to be rewritten to be passed to a mod_rewrite.php file in my root directory. Mod_rewrite does not seem to be working 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>
like image 482
cactusbin Avatar asked Oct 10 '22 20:10

cactusbin


1 Answers

Here's what you need to do:

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /
  RewriteRule ^(.*)/?$ mod_rewrite.php?vpath=$1 [L,QSA,NC]
</IfModule>
like image 150
Book Of Zeus Avatar answered Oct 13 '22 10:10

Book Of Zeus