.htaccess "Server error!"
Posted: 30. June 2008 21:29
I have posted this topic on two other forums and I did not get a reply. I'm trying here.
I'm using XAMPP (basic package) version 1.6.6a
I'm trying to create a script to redirect to r2.php al the visitors that want to download a photo from my server. (this is just for learning purposes)
This is the .htaccess that I've created
When I want to visit p.gif ( or any other photo ) I get this error:
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500
localhost
06/22/08 19:04:53
Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5
Why is that? .htaccess, p.gif, r2.php are al in the same folder.
Does the server error appear because the .htaccess file has syntax errors?
I'm using XAMPP (basic package) version 1.6.6a
I'm trying to create a script to redirect to r2.php al the visitors that want to download a photo from my server. (this is just for learning purposes)
This is the .htaccess that I've created
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)? [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ /r2.php [NC,R,L]
When I want to visit p.gif ( or any other photo ) I get this error:
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500
localhost
06/22/08 19:04:53
Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5
Why is that? .htaccess, p.gif, r2.php are al in the same folder.
Does the server error appear because the .htaccess file has syntax errors?