Rewrite module at times of error 500

0

I'm doing a project, and I learned a little about the rewrite of URL's , I did as I saw in the tutorials, but sometimes when I try to access the address the browser returns erro 500 , that would be some problem with my htaccess ? this is the code I'm using

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d

   RewriteRule ^navegar/?$ inicio.php [NC,L]
</IfModule>

I'm using the same rewriting pattern for all pages and the same error persists with all, what's wrong?

    
asked by anonymous 02.10.2016 / 23:38

1 answer

0

I think you're forgetting the base rewrite try this

It goes ex of mine that I use in my serv. Note: Apache mod rewrite has to be active if it will not even give 500 error

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ inicio.php?cod=$1
</IfModule>
    
03.10.2016 / 00:37