Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Blogs and Blogging (http://www.greenguysboard.com/board/forumdisplay.php?f=8)
-   -   WordPress and .htaccess (http://www.greenguysboard.com/board/showthread.php?t=51739)

NY Jester 2009-03-02 07:16 PM

WordPress and .htaccess
 
I know there have been threads about hotlink protection etc. using .htaccess.

But I thought htaccess in WP was a bit different |huh

Anyway. The question at hand is this. How do I stop hotlinking post images from my blogs. And more so, how do I replace the hotlinked image with another image with say just the blog URL on it?

Thanks in advance.

Beaver Bob 2009-03-02 07:39 PM

htaccess should be no different on wordpress than any other site.. the only thing is you need this code for your permalinks to work

Code:


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

now for the hotlinking, this page will generate what you need:
http://www.htaccesstools.com/hotlink-protection/

NY Jester 2009-03-02 10:03 PM

Would I put the .htaccess file in the blog directory

ex: http://www.myblog.com/blog/ would I put the htaccess in the /blog/ directory?

Thanks

Beaver Bob 2009-03-02 10:20 PM

Quote:

Originally Posted by NY Jester (Post 443008)
Would I put the .htaccess file in the blog directory

ex: http://www.myblog.com/blog/ would I put the htaccess in the /blog/ directory?

Thanks

The htaccess code for your permalinks go in the /blog directory

So the question is, do you want hotlink protection on the entire domain or just the blog?

If you want to protect outside /blog, the hotlink protection code would go in its own .htaccess file located in the root of the domain.

If you are only concerned with protecting whats inside the blog directory, you can add the hotlink protection code to your existing .htaccess in /blog

NY Jester 2009-03-02 10:49 PM

it appears right now that the only images being hotlinked are from the blog, so I guess ill just update the htaccess in the blog directory.

Thanks

walrus 2009-03-03 12:46 PM

Are they being hotlinked or are they being picked up as a part of your RSS feed? If there is a specific person / website / IP by all means stop them from hot linking your stuff.

But don't shoot yourself in the foot by disabling one of your most valuable marketing tools, your RSS feed.

NY Jester 2009-03-03 02:08 PM

They are being hot linked by 1 or two sites...should I just let them go for now? I mean its forum traffic, and its not eating too much BW..also if someone checks the location it would be somewhat of a free advert possibly?

walrus 2009-03-04 01:40 PM

If it's not eating a bunch of band width, I'd probably let it go. If it's a problem try contacting the forum owners.

The forum hot links usually only last for the life of the post.

balls_deep 2009-03-05 08:20 AM

another option is to watermark your photos with your domain name in the corner, this is basically free advertisement.


All times are GMT -4. The time now is 05:12 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc