Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-19-2012, 04:37 PM   PM User | #1
darkNiGHTS0
New to the CF scene

 
Join Date: Jan 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
darkNiGHTS0 is an unknown quantity at this point
Help with .htaccess image redirects

I am running an SMF forum and because of custom board icons, there are five separate PNG files that are all the same for different boards. I tried creating a .htaccess file in notepad with these contents:

Code:
Redirect /Themes/Captain%20Placeholder/icons/91/on.png /Themes/Captain%20Placeholder/icons/69/on.png
Redirect /Themes/Captain%20Placeholder/icons/84/on.png /Themes/Captain%20Placeholder/icons/69/on.png
Redirect /Themes/Captain%20Placeholder/icons/59/on.png /Themes/Captain%20Placeholder/icons/69/on.png
Redirect /Themes/Captain%20Placeholder/icons/28/on.png /Themes/Captain%20Placeholder/icons/69/on.png
and placed it in the root directory of the forum. But it doesn't work. Could someone help me out?
darkNiGHTS0 is offline   Reply With Quote
Old 01-19-2012, 05:59 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,653
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
How did you test that it doesn't work? Did you remove the original images from the filesystem or check the httpd logs to see?
Does your server allow you to issue redirect using an htaccess?
Fou-Lu is offline   Reply With Quote
Old 01-19-2012, 07:13 PM   PM User | #3
darkNiGHTs
New to the CF scene

 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
darkNiGHTs is an unknown quantity at this point
I used Google Web Developer tools to check the location of the image and it's still the same. And I'm pretty sure it allows use of .htaccess, but it's possible it doesn't. Does the code look right?
darkNiGHTs is offline   Reply With Quote
Old 01-19-2012, 07:19 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,653
Thanks: 4
Thanked 2,451 Times in 2,420 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
The redirect looks fine to me.
You need to check your apache logs to see if it actually redirects it. HTML wise, it will remain as the original. I have no idea what the google tools do.
Don't forget to clear your cache as well.
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:23 AM.


Advertisement
Log in to turn off these ads.