grml: why doesn't my .htaccess work??? grml: why doesn't my .htaccess work???
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

grml: why doesn't my .htaccess work???

Started by pablo4711, April 22, 2005, 10:10:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pablo4711

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!

biesky83

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]

pablo4711

what do you mean?
where i have to place the file? in the root- or in the cpg-directory?!  ???

Tranz

biesky83 said to put it into your coppermine 'albums' directory.

pablo4711

#4
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?  ???

Tranz

I see the images fine in Firefox and IE. Try clearing your cache.

pablo4711

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.  ;)

Tranz

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.

pablo4711

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!

Tranz

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.