mod rewrite question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • s0laris2
    Confirmed User
    • Jun 2002
    • 317

    #1

    mod rewrite question

    Hello!

    I can redirect a url to another address fine with mod rewrite.

    But cannot seem to redirect an img src.

    Is this even possible?

    ie

    img src = /foo.com/test.jpg

    and rewrite

    redirects to /foo2.com/test.jpg>
  • chrisp420
    Confirmed User
    • Aug 2002
    • 572

    #2
    icq me, i can help ya out..
    icq: 327189899

    Comment

    • frank7799
      Confirmed User
      • Jul 2003
      • 1974

      #3
      Originally posted by s0laris2
      Hello!

      I can redirect a url to another address fine with mod rewrite.

      But cannot seem to redirect an img src.

      Is this even possible?

      ie

      img src = /foo.com/test.jpg

      and rewrite

      redirects to /foo2.com/test.jpg>
      If you want all image requests being redirected, try this:


      RedirectMatch (.*) \.jpg$ http://image.server.com$1.jpg


      If foo2.com is your target url it should be like this:
      RedirectMatch (.*) \.jpg$ http://foo2.com$1.jpg

      Comment

      Working...