FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General FutureQuest Hosting Support
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 02-17-2008, 12:55 AM   Postid: 165295
johnfl68
Site Owner
 
johnfl68's Avatar

Forum Notability:
975 pts: Dignified Competence!
[Post Feedback]
 
Join Date: Nov 2003
Location: Orlando, FL
Posts: 1,018
mod rewrite jpg to gif?

Hello all, I'm not all up with htaccess mod rewrites. Is it possible to do one that would redirect links for a jpg image to a gif image (same size)?

I have 4 banners that have external links, and the next update doesn't look good as a jpg, but looks good as a gif. I don't want to have everyone that is currently linked to have to update the code on their end, but do this on my end if at all possible. And then I would also have the ability to change back to a jpeg at a later date if needed.

For example:
images/imu728x90.jpg redirects to images/imu728x90.gif

Thanks for any insight as always!

John
__________________
Major Warden: Yes, there's always the unexpected, isn't there?
The Bridge on the River Kwai (1957)
johnfl68 is offline   Reply With Quote
Old 02-17-2008, 05:34 AM   Postid: 165298
kitchin
Site Owner

Forum Notability:
1163 pts: A True Crowd-pleaser!
[Post Feedback]
 
Join Date: Jan 2001
Location: Virginia
Posts: 2,992
Re: mod rewrite jpg to gif?

Looky here, that exact example is in "RedirectMatch" on this page:
http://httpd.apache.org/docs/1.3/mod...#redirectmatch
Just change "anothersever.com" to your sameserver.com, works the same.

You could insert a "301" after "RedirectMatch" to indicate it's permanent, otherwise it is 302 Temporary.
kitchin is offline   Reply With Quote
Old 02-17-2008, 07:11 PM   Postid: 165311
johnfl68
Site Owner
 
johnfl68's Avatar

Forum Notability:
975 pts: Dignified Competence!
[Post Feedback]
 
Join Date: Nov 2003
Location: Orlando, FL
Posts: 1,018
Re: mod rewrite jpg to gif?

Thanks! That pointed me in the right direction.

I ended up using the following:

Code:
Redirect 307 /images/banners/imu728x90.jpg http://www.mywebsite.com/images/banners/imu728x90.gif
Since there was only 4 files I needed to do this to, this seemed to be the best way.

From what I could tell, the 307 Temporary Redirect status seemed to be the best to fit this, as it is temporary, and will change back in the future.

John
__________________
Major Warden: Yes, there's always the unexpected, isn't there?
The Bridge on the River Kwai (1957)
johnfl68 is offline   Reply With Quote
Old 02-17-2008, 07:42 PM   Postid: 165312
kitchin
Site Owner

Forum Notability:
1163 pts: A True Crowd-pleaser!
[Post Feedback]
 
Join Date: Jan 2001
Location: Virginia
Posts: 2,992
Re: mod rewrite jpg to gif?

Glad to hear it. I'm not familiar with 307, but I guess if a browser doesn't understand it, it will assume 302. Maybe somebody else can answer that small point, which is no big deal in any case! The odd history of 302 vs. 307 is in the "3xx" section here:
http://en.wikipedia.org/wiki/List_of...xx_Redirection
kitchin is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 03:11 AM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.