![]() |
Any .htaccess masters?
I need some sort of .htaccess rule which will do the following:
I have a bunch of images in a folder that are hotlinked on other servers.I want to delete all these images and redirect all these 404`s so that instead of the hotlinkers getting a nice red X they`ll get a new image I`ll upload to my server. I know there is a way to do it but I don`t know how.Anyone? |
|
rewriteEngine on
rewriteRule ^http://www.your-site.com/directory-of-images/(.*)$ http://www.your-site.com/newfile.jpg [R=301,L] everything after 'rewriteEngine on' should be on one line.. |
Thanks for the help!
Since I was planning to delete the images anyway I found a simple rule for 404`s: ErrorDocument 404 http://www.domain.com/newfile.jpg Thanks again! |
Quote:
RewriteEngine on RewriteCond %{REQUEST_URI} !-U RewriteRule \.(gif|jpg|jpeg)$ /your_path_to/new.gif [L] # the following is for normal 404s ErrorDocument 404 http://www.your404.com |
Oh, thanks for reminding me.
|
All times are GMT -7. The time now is 05:14 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123