PDA

View Full Version : .htaccess help


Lee
06-16-2005, 03:45 PM
That sucker has been posted on around 20 different forums in the last 12 hours LMAO

How do i change it [the htaccess] so that instead of just showing a blank image, it redirects to a different image?

Trev
06-16-2005, 04:00 PM
Try this

RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://.*your're-domain/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*your're-domain:80/.*$ [NC]
RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://you're-domain/whatever.gif-jpg [R,L]


:)


Edit: this frickin board messed with it... it's ok now

Lee
06-16-2005, 04:08 PM
Cheers Mate :)

Lets try this sucker out..

http://www.bunnypancake.com/bunnypancake.jpg

*fingers crossed*

Lee
06-16-2005, 04:08 PM
Trev,

You suck LOL

Trev
06-16-2005, 04:14 PM
Originally posted by Lee@Jun 16 2005, 09:09 PM
Trev,

You suck LOL
Rename the bunnypic and see what happens...

Trev
06-16-2005, 04:15 PM
Originally posted by Trev+Jun 16 2005, 09:15 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Trev @ Jun 16 2005, 09:15 PM)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-Lee@Jun 16 2005, 09:09 PM
Trev,

You suck LOL
Rename the bunnypic and see what happens... [/b][/quote]
On your server that is...

Lee
06-16-2005, 04:17 PM
Okay tried that and its still not working.

Nat Net tells me i have htaccess stuff turned on.

The pic is called bunnypancake.jpg and the pic i want to replace it with is called bunny.jpg

Trev
06-16-2005, 04:19 PM
Originally posted by Lee@Jun 16 2005, 09:18 PM
Okay tried that and its still not working.

Nat Net tells me i have htaccess stuff turned on.

The pic is called bunnypancake.jpg and the pic i want to replace it with is called bunny.jpg
Hmm gimme a moe to dig through my shit... I've got one that works here somewhere...

Lee
06-16-2005, 04:19 PM
That also gives me an internal server error when i try to access bunnypancake.com too :(

Lee
06-16-2005, 04:20 PM
Cheers fella :)

Trev
06-16-2005, 04:33 PM
The only way I can get .htaccess to do what you ask is to drop this on bunnypancake:


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?bunnypancake.com /.*$ [NC]
RewriteRule \.(gif|jpg|jpeg)$ http://www.another-domain.com/bunny.jpg [R,L]


then on another domain place this into your existing .htaccess:


RewriteCond %{HTTP_REFERER} !^http://.*oprano.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*gofuckyourself.com/.*$ [NC]





It's a fix until Sarettah can drop some wisdom on this :)

Dravyk
06-16-2005, 04:40 PM
Originally posted by Trev@Jun 16 2005, 03:34 PM
It's a fix until Sarettah can drop some wisdom on this :)
Maybe it's how you phrased that sentence ... but for some reason, reading it, it makes me think toilet paper is somehow involved. :lol:

Trev
06-16-2005, 04:40 PM
Oh and it would be easier if you put the image in a folder then the .htaccess could be dropped in there and you could call for an image on the root of the same domain :)

Lee
06-16-2005, 04:40 PM
Originally posted by Trev@Jun 16 2005, 12:41 PM
Oh and it would be easier if you put the image in a folder then the .htaccess could be dropped in there and you could call for an image on the root of the same domain :)
Lemme try that then :)

Trev
06-16-2005, 04:41 PM
Originally posted by Dravyk+Jun 16 2005, 09:41 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Dravyk @ Jun 16 2005, 09:41 PM)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-Trev@Jun 16 2005, 03:34 PM
It's a fix until Sarettah can drop some wisdom on this :)
Maybe it's how you phrased that sentence ... but for some reason, reading it, it makes me think toilet paper is somehow involved. :lol: [/b][/quote]
hahahaha


I it must have been my subconscious that typed that :)

Dravyk
06-16-2005, 04:42 PM
Looking at how fast the time stamps are flying on this thread ... Uh, you guys ever hear of ICQ? :P

Trev
06-16-2005, 04:42 PM
Originally posted by Lee+Jun 16 2005, 09:41 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Lee @ Jun 16 2005, 09:41 PM)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-Trev@Jun 16 2005, 12:41 PM
Oh and it would be easier if you put the image in a folder then the .htaccess could be dropped in there and you could call for an image on the root of the same domain :)
Lemme try that then :) [/b][/quote]
But everyone linking to the bunnypancake pic on the root will still get it, or a broken image if it's moved...

Trev
06-16-2005, 04:43 PM
Originally posted by Dravyk@Jun 16 2005, 09:43 PM
Looking at how fast the time stamps are flying on this thread ... Uh, you guys ever hear of ICQ? :P
It's all about page views :nyanya:

Lee
06-16-2005, 04:44 PM
Originally posted by Dravyk@Jun 16 2005, 12:43 PM
Looking at how fast the time stamps are flying on this thread ... Uh, you guys ever hear of ICQ? :P
Drav, thats soooooo 2000 ;)

Trev
06-16-2005, 04:45 PM
Originally posted by Trev+Jun 16 2005, 09:43 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Trev @ Jun 16 2005, 09:43 PM)</td></tr><tr><td id='QUOTE'> Originally posted by Lee@Jun 16 2005, 09:41 PM
<!--QuoteBegin-Trev@Jun 16 2005, 12:41 PM
Oh and it would be easier if you put the image in a folder then the .htaccess could be dropped in there and you could call for an image on the root of the same domain :)
Lemme try that then :)
But everyone linking to the bunnypancake pic on the root will still get it, or a broken image if it's moved... [/b][/quote]
and I meant NEXT time you want to play bandwidth king over at the zoo, you should drop the image into its own folder :)


It's to late to try that now so you'll have to do the 2 domain .htaccess...

Dravyk
06-16-2005, 04:46 PM
Originally posted by Trev+Jun 16 2005, 03:44 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Trev @ Jun 16 2005, 03:44 PM)</td></tr><tr><td id='QUOTE'><!--QuoteBegin-Dravyk@Jun 16 2005, 09:43 PM
Looking at how fast the time stamps are flying on this thread ... Uh, you guys ever hear of ICQ? :P
It's all about page views :nyanya:[/b][/quote]
I thought it was "all about the O". B)

Drav, thats soooooo 2000
Silly me!

Trev
06-16-2005, 04:49 PM
Originally posted by Dravyk+Jun 16 2005, 09:47 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Dravyk @ Jun 16 2005, 09:47 PM)</td></tr><tr><td id='QUOTE'> Originally posted by Trev@Jun 16 2005, 03:44 PM
<!--QuoteBegin-Dravyk@Jun 16 2005, 09:43 PM
Looking at how fast the time stamps are flying on this thread ... Uh, you guys ever hear of ICQ? :P
It's all about page views :nyanya:
I thought it was "all about the O". B)
[/b][/quote]
Erm... yeah thats what I meant to say :rolleyes:

BillPMB
06-16-2005, 05:23 PM
This will do it

RedirectMatch .*\.[Jj][Pp][Gg]$ http://www.notthebunny.com/kittynotbunny.jpg

Just put that in your .htaccess in the directory with the bunny

sarettah
06-16-2005, 05:41 PM
RewriteEngine On
ReWriteRule .*\bunnypancake.jpg$ http://www.yourdomain.com/bunny.jpg [R,L]

Lee
06-16-2005, 05:45 PM
Woo Hoo!

Thanks Bill / Sare :)

Lee
06-16-2005, 05:56 PM
Cept now i get this.. http://www.bunnypancake.com LOL

Trev
06-16-2005, 06:23 PM
If they can get it to form a link then you're laughing :unsure:

Trev
06-16-2005, 06:28 PM
Try this:

RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} !^$
ReWriteRule .*\bunnypancake.jpg$ http://www.bunnypancake.com/bunny.jpg [R,L]



I'm using it on my avatar and it's working





Edit: I was using it, but I've changed back to my set .htaccess now.... but it works for me :)

Dravyk
06-16-2005, 08:19 PM
Retitle this thread to "How many webmasters does it take to screw in a lightbulb?" :P

Trev
06-17-2005, 03:31 AM
Originally posted by Dravyk@Jun 17 2005, 01:20 AM
Retitle this thread to "How many webmasters does it take to screw in a lightbulb?" :P
Why he doesn't just put another pic in it's place is beyond me <_<

gigi
06-17-2005, 10:31 AM
Originally posted by Trev+Jun 16 2005, 11:32 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Trev @ Jun 16 2005, 11:32 PM)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-Dravyk@Jun 17 2005, 01:20 AM
Retitle this thread to "How many webmasters does it take to screw in a lightbulb?" :P
Why he doesn't just put another pic in it's place is beyond me <_< [/b][/quote]
Lee, is there any reason why you MUST keep the name of the image bunnycake.jpg?? If you want to pull that image at your site, but give the GFYers something else.....ummm,.....can't you just resave the REAL bunny image as mybunny.jpg and then create a bunnycake.jpg for the GFYers?

I could see if the bunnycake.jpg was being pulled by a ton of your other sites/domains....is it? If not, wouldn't this be the simplest solution?

Lee
06-17-2005, 01:26 PM
Because bunnypancake.jpg is what the image is known as web-wide already ;)

Its why tubgirl.com has tubgirl.jpg on their site, and why lemonparty.org has lemonparty.jpg on their site ;)

Trev
06-17-2005, 02:04 PM
Originally posted by Lee@Jun 17 2005, 06:27 PM
Because bunnypancake.jpg is what the image is known as web-wide already ;)

Its why tubgirl.com has tubgirl.jpg on their site, and why lemonparty.org has lemonparty.jpg on their site ;)
I'm with you now, understandable I guess :)

sarettah
06-17-2005, 02:58 PM
Originally posted by Lee@Jun 17 2005, 12:27 PM
Its why tubgirl.com has tubgirl.jpg on their site
A pic by any other name would be just as sick ............. (snakeshit circa 1650)

:blink: