Hallo,
da ich in einem bestimmten Fall erkenne möchte wer auf Inhalte zugreift, ist es notwendig, einen Teilstring des Referrers zu erkennen.
Beispiel:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://www.irgendwas.de?id=648238768 $ [NC]
RewriteRule .*.jpg$ hastenichgesehen.gif
Wenn jetzt also http://www.irgendas.de?id=648238768 die Seite aufruft soll hastenichgesehen.gif gezeigt werden. Bei allen anderen id´s nicht!
Was mache ich falsch? Egal wer aufruft - Es wird hastenichtgesehen.gif angezeigt.
mod rewrite erkennung eines Teilstrings im referrer
Re: mod rewrite erkennung eines Teilstrings im referrer
Das Ausrufezeichen ist zuviel.
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Re: mod rewrite erkennung eines Teilstrings im referrer
Ja, wenn ich das raus nehme wird das Ersatzbild angezeigt.
Leider ist es egal ob ich mit dieser id oder einer anderen aufrufe.
Ich möchte eine Fallunterscheidung.
Leider ist es egal ob ich mit dieser id oder einer anderen aufrufe.
Ich möchte eine Fallunterscheidung.
Re: mod rewrite erkennung eines Teilstrings im referrer
Versuche es mal mit:
Code: Select all
RewriteCond %{QUERY_STRING} ^(.*)id=648238768$ [NC]
RewriteRule .*.jpg$ hastenichgesehen.gif
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Re: mod rewrite erkennung eines Teilstrings im referrer
Das Ergebnis ist das gleiche...
Re: mod rewrite erkennung eines Teilstrings im referrer
Habe es jetzt so gelöst...
Funktioniert hervorragend.
Code: Select all
<Files ~ ".(gif|jpe?g|png)$">
ErrorDocument 403 http://www.meinedomain.de/ersatzbild.jpg
SetEnvIfNoCase Referer ".*(gesuchter String).*" Verboten
Order Allow,Deny
Deny from env=Verboten
Allow from all
</Files>
