akvitka
08-09-2002, 11:57 AM
I have a problem with getting an .htaccess file to work on my new XTR box. As I am new to the Linux world, I’m hoping someone can either help me determine what the problem/fix is, or fix it for me (I will pay of course). Here is the summary.
I am trying to create a .htaccess file that will do 3 things. I've gotten 2 of the things to work, but not the last. I have a feeling that the problem is with the say XTR box is configured and not with how the .htaccess file is written. Let me set the stage.
One of the clients that I am hosting on the XTR is running tons of images and has asked me to help him fix the .htaccess file because his images are being hot-linked. So I created the following file (see below), and uploaded it to his /web/ directory of his domain. Two of the things the file is meant to do are working - 404/403 re-directs, and disabling directory browsing. Hot-linking is still allowed.
Based on help from documentation and Sun Support Forum, I went into the access.conf file and changed all instances of AllowOverride None to AllowOverride ALL, then restarted the server. And I also followed all the other rules such as, upload the file using ASCII mode, etc.
So my guess is that there is something else in the way Sun has configured the XTR to prevent certain .htaccess features to function. On the other hand there may be things that I need to do in the site settings that are not discussed in the documentation or the knowledge base.
I am willing to give an expert complete access to the XTR if they would be willing to telnet into it and try to figure out where the problem is. Of course I will pay and would love to know what the problem is and how it was dealt with it.
Thank you in advance.
Andre
----------------------------------------------------------------------------
AuthPAM_enabled off
IndexIgnore *
AuthUserFile /dev/null
AuthGroupFile /dev/null
Options +FollowSymlinks
ErrorDocument 404 http://www.domain.com/index.html
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^.* domain.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://1.1.1.1.*$ [NC]
RewriteRule .*\.jpg$ http://www.domain.com/index.html [R,L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^.* domain.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://1.1.1.1.*$ [NC]
RewriteRule .*\.gif$ http://www.domain.com/index.html [R,L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^.* domain.com.*$ [NC
RewriteCond %{HTTP_REFERER} !^http://1.1.1.1.*$ [NC]
RewriteRule .*\.qt$ http://www.domain.com/index.html [R,L]
AddType text/x-server-parsed-html .htm
Of course the IP and domain substituted in the real file.
I am trying to create a .htaccess file that will do 3 things. I've gotten 2 of the things to work, but not the last. I have a feeling that the problem is with the say XTR box is configured and not with how the .htaccess file is written. Let me set the stage.
One of the clients that I am hosting on the XTR is running tons of images and has asked me to help him fix the .htaccess file because his images are being hot-linked. So I created the following file (see below), and uploaded it to his /web/ directory of his domain. Two of the things the file is meant to do are working - 404/403 re-directs, and disabling directory browsing. Hot-linking is still allowed.
Based on help from documentation and Sun Support Forum, I went into the access.conf file and changed all instances of AllowOverride None to AllowOverride ALL, then restarted the server. And I also followed all the other rules such as, upload the file using ASCII mode, etc.
So my guess is that there is something else in the way Sun has configured the XTR to prevent certain .htaccess features to function. On the other hand there may be things that I need to do in the site settings that are not discussed in the documentation or the knowledge base.
I am willing to give an expert complete access to the XTR if they would be willing to telnet into it and try to figure out where the problem is. Of course I will pay and would love to know what the problem is and how it was dealt with it.
Thank you in advance.
Andre
----------------------------------------------------------------------------
AuthPAM_enabled off
IndexIgnore *
AuthUserFile /dev/null
AuthGroupFile /dev/null
Options +FollowSymlinks
ErrorDocument 404 http://www.domain.com/index.html
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^.* domain.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://1.1.1.1.*$ [NC]
RewriteRule .*\.jpg$ http://www.domain.com/index.html [R,L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^.* domain.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://1.1.1.1.*$ [NC]
RewriteRule .*\.gif$ http://www.domain.com/index.html [R,L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^.* domain.com.*$ [NC
RewriteCond %{HTTP_REFERER} !^http://1.1.1.1.*$ [NC]
RewriteRule .*\.qt$ http://www.domain.com/index.html [R,L]
AddType text/x-server-parsed-html .htm
Of course the IP and domain substituted in the real file.
