coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: pablo4711 on April 22, 2005, 10:10:19 AM

Title: grml: why doesn't my .htaccess work???
Post by: pablo4711 on April 22, 2005, 10:10:19 AM
hello!

i create in my directory www.xyz.de/coppermine a .htaccess with this code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?xyz\.de(/.*)?$ [NC]
RewriteRule \.(gif|jpg|jpeg|GIF|JPG|JPEG)$ http://www.xyz.de/icons/copyright.gif [R,L]


if i reffer to a picture in the protected directory, there is displayed a "broken-link-picture" and not my rewrite-picture "copyright.gif".
and if i want to open my cpg (www.xyz.de/coppermine/index.php) there just comes
QuoteInternal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, service@webmailer.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

please help me!
Title: Re: grml: why doesn't my .htaccess work???
Post by: biesky83 on April 23, 2005, 01:00:41 AM
think about what you just wrote. you created a rewrite rule in your coppermine ROOT DIRECTORY. you want to place that .htaccess in your albums directory, not the root. Also Im on an apache server and this is what my file looks like:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://www.yoursitename.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.youristename.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://yoursitename.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://yoursitename.com$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp.*.*jpg|jpeg|gif|png|bmp)$ http://www.urlOFwhereYOUwantTHEMdirected.com [R,NC]
Title: Re: grml: why doesn't my .htaccess work???
Post by: pablo4711 on April 26, 2005, 12:49:38 PM
what do you mean?
where i have to place the file? in the root- or in the cpg-directory?!  ???
Title: Re: grml: why doesn't my .htaccess work???
Post by: Tranz on April 26, 2005, 04:29:47 PM
biesky83 said to put it into your coppermine 'albums' directory.
Title: Re: grml: why doesn't my .htaccess work???
Post by: pablo4711 on April 28, 2005, 04:22:19 PM
after creating this .htaccess-file...
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://www.xyz.de/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.xyz.de$      [NC]
RewriteCond %{HTTP_REFERER} !^http://xyz.de/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://xyz.de$      [NC]
RewriteRule .*\.(jpg|jpeg|JPG|JPEG|gif|png|bmp.*.*jpg|jpeg|JPG|JPEGgif|png|bmp)$ http://www. xyz.de [R,NC]

...in the www.xyz.de/coppermine/albums/-directory, everything i can see on my cpg is that:

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.xyz.de%2Fdoof.jpg&hash=d8ad49630beacf9c3afc094ff058e9bd3e77bec4)

why?  ???
Title: Re: grml: why doesn't my .htaccess work???
Post by: Tranz on April 28, 2005, 04:29:36 PM
I see the images fine in Firefox and IE. Try clearing your cache.
Title: Re: grml: why doesn't my .htaccess work???
Post by: pablo4711 on April 28, 2005, 04:49:44 PM
Quote from: TranzNDance on April 28, 2005, 04:29:36 PM
I see the images fine in Firefox and IE. Try clearing your cache.
after taking the screenshot, i removed the htaccess...
i took it, because the cpg should run again.  ;)
Title: Re: grml: why doesn't my .htaccess work???
Post by: Tranz on April 29, 2005, 05:47:06 AM
Quote from: pablo4711 on April 28, 2005, 04:49:44 PM
Quote from: TranzNDance on April 28, 2005, 04:29:36 PM
I see the images fine in Firefox and IE. Try clearing your cache.
after taking the screenshot, i removed the htaccess...
i took it, because the cpg should run again. ;)
You should have noted what you had done so I (and anyone else) would not have wasted my time troubleshooting a non-existing issue.
Title: Re: grml: why doesn't my .htaccess work???
Post by: pablo4711 on April 29, 2005, 09:57:19 AM
was is?
ich hab doch geschrieben, was ich gemacht habe und durch das bild dokumentiert, was passiert ist, oder?
natürlich habe ich das ganze rückgängig gemacht, damit cpg übrhaupt wieder läuft und meine freunde drauf zugreifen können!
Title: Re: grml: why doesn't my .htaccess work???
Post by: Tranz on April 29, 2005, 04:36:09 PM
Quote from: pablo4711 on April 29, 2005, 09:57:19 AM
was is?
ich hab doch geschrieben, was ich gemacht habe und durch das bild dokumentiert, was passiert ist, oder?
natürlich habe ich das ganze rückgängig gemacht, damit cpg übrhaupt wieder läuft und meine freunde drauf zugreifen können!
Because sometimes people have trouble seeing images and others do not. That's why it's called problem replication. ::)

Since you want to continue to be rude and waste my time by posting in a foreign language so that I have to use a translator, I'm out of this thread.