Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    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?

  • #3
    New to the CF scene
    Join Date
    Aug 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •