SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    htaccess for css & gif's

    Why does this not work:

    Code:
    <link href="../original.css" rel="stylesheet" type="text/css">
    
    /*htaccess*/
    redirect 301 /original.css 
    http://www.sitedotcom/a/TEST.css
    I've noticed gif's don't want to 301 either.

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,650
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    dd,

    The reason is the REQUIRED syntax of the Redirect statement:

    Redirect {optional error status} {file/directory} {absolute redirection} ... all on one line

    As just explained in another thread, the file/directory part apparently should not be an absolute link (as you have with an "internal" absolute link).

    The absolute redirection does NOT require the full URL as /a/TEST.css would have sufficed.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

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