Rewrite module times error 500

Asked

Viewed 154 times

0

I’m doing a project, and I recently learned about the rewriting 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, would that some problem with my htaccess? that’s 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 rewrite pattern for all pages and the same error persists with all, what’s wrong?

  • Details of the error must be in the Apache error log. Read the log to mitigate the problem before applying any solution at random.

1 answer

0


I think you’re forgetting the rewrite base try like this

follows ex of mine that I use in my Serrv. Note: apache rewrite mod has to be active if it won’t give error 500 even

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ inicio.php?cod=$1
</IfModule>
  • The error remains, Error 500 appears, sometimes I give F5 and load and sometimes the error appears again, module_rewrite is enabled in Apache

  • vc is using on or offline?

  • because if sometimes it works and sometimes not without you touch anything the problem may be in your apache.

  • I’m using On, my concern is with Wamp apache, so I asked because I don’t want that kind of error when the site is online

  • best thing q vc Faiz he install a debian or centos ai Vmware or Ubuntu with apache mysql and php and test it. or have a Rv online for you to test.

  • I will try to test here on an online server, vlw by the attention

  • c not sure m warns, c der vota plus ai ^^

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.