Htaccess

software development

#1

Hey guys,
I’m new to .htaccess and need some help because I followed wiki instructions on creating .htaccess file and I got 500 error.
Here’s what I had in there:

<Files .htaccess>
order allow,deny
deny from all

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://viktorix.com.$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.viktorix.com.
$ [NC]
RewriteRule .*.(gif|jpg|jpeg|bmp|html|png|css|js)$ http://www.viktorix.com [R,NC]
SSLOptions +StrictRequire
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq “viktorix.com#or www.viktorix.com
ErrorDocument 403 https://viktorix.com

I need some help on whats wrong. Ok, another question. I thought that in order to use https we had to get certificates from someone like VeriSign?

thanks in advance for any info,
viktor


#2

Viktor,

I think your two questions are related. :wink: While you don’t have to obtain your certificate from Verisign (there are many places to get certificates, and some are a lot less expensive than Verisign), you do have to have, and have installed, a certificate to use ssl (https).

If you have not installed a certificate, the ssl related lines in the .htaccess files are most likely the source of your error(s).

I’d try removing the following lines from the .htaccess file and see if the 500 error goes away:

SSLOptions +StrictRequire
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq “viktorix.com#or www.viktorix.com

–rlparker