Jump to content

Internal error 500


felito

Recommended Posts

hi

 

i tried this code, but i get an error because the last line

RewriteRule \.php$ - [R=404,L]

 

RewriteEngine on

# allow example.com/foo
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.php$
RewriteRule ^(.+)$ /$1.php?myvar=0 [L]

# but don't allow example.com/foo.php
RewriteCond  %{QUERY_STRING} !^myvar=0$
RewriteRule \.php$ - [R=404,L]

 

any idea? i want to redirect the access to all files with termination with .php

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/232760-internal-error-500/
Share on other sites

log

 

 

[Tue Apr 05 16:16:26 2011] [notice] Child 3972: Child process is running

[Tue Apr 05 16:16:26 2011] [notice] Child 3972: Acquired the start mutex.

[Tue Apr 05 16:16:26 2011] [notice] Child 3972: Starting 250 worker threads.

[Tue Apr 05 16:16:26 2011] [alert] [client 127.0.0.1] C:/Users/fel/VertrigoServ/www/.htaccess: RewriteRule: invalid HTTP response code for flag 'R'

Link to comment
https://forums.phpfreaks.com/topic/232760-internal-error-500/#findComment-1197230
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.