Image redirect
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Re: Image redirect
- « Previous
-
- 1
- 2
- Next »
Re: Image redirect
30-08-2007 3:15 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: ianscales I might be barking up the wrong tree here but, if your not already using a customised 404 page could you not use that to display the 'image not available' message.
I know the above would be a bit messy but at least it should fix it for now.
The 404 error is for html pages that are not found, it won't work for individual images on a page that does exist.
Re: Image redirect
30-08-2007 4:04 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
http://www.garnetchaney.com/htaccess_tips_and_tricks.shtml
Re: Image redirect
30-08-2007 4:38 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Ian
Re: Image redirect
30-08-2007 5:00 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: ianscales Not wishing to appear stupid (Quite easy in my case) why is he getting a '404' page when it's the image that can't be found?
Ian
He isn't. What he is looking for is a way to redirect specific image requests to a generic "Image not found" image, so that broken image links aren't shown on forums that he used to post on.
Re: Image redirect
30-08-2007 5:31 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
« Reply #13 on 29/08/2007, 17:19 »
--------------------------------------------------------------------------------
@oliverb
I appreciate you trying to help. I just tried that with
Re: Image redirect
30-08-2007 6:43 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote The 404 error is for html pages that are not found, it won't work for individual images on a page that does exist.
Hmmm...
If I go to http://www.me.plus.com/1.jpg
I do get a 404 error page. Is that not normal?
@MikeWhitehead
I'll take a look at that link but everything I've found so far on the web either doesn't mention what I'm trying to do, or gives the same answers as I've had here which -- for whatever reason -- doesn't work for me.
Thanks for trying to help everyone.
Re: Image redirect
30-08-2007 7:01 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
If I replace
#RewriteCond %{REQUEST_URI} !-U
with
RewriteCond %{REQUEST_FILENAME} !-f
it works. Well I haven't tried it extensively yet but it does show a default image if the requested one doesn't exist, and it does show the proper image if it does.
Now, is there anything wrong with using this? I don't like using code when I don't understand it really. What does the -f switch do?
Thanks for any help.
Re: Image redirect
30-08-2007 7:35 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
So it basically means if the file exists, do the corresponding rewrite rule
In your case its using the reverse by specifying ! (not) so it is saying if the file does not exist do the rewrite rule.
The same goes for the previous text using -U which means if the specified URI exists, do the rewrite rule or !-U is if the URI does not exist do the rewrite rule.
See http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
For the meaning of -f etc see http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond
Re: Image redirect
30-08-2007 7:57 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Image redirect
30-08-2007 10:04 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: ratbag Well, thank you MikeWhitehead. That link you supplied seems to have the solution.
I'm glad this resolved your problem
- « Previous
-
- 1
- 2
- Next »
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page