mapping stylesheet path

Discussion in 'Apache' started by itssangy, Dec 17, 2007.

  1. #1
    Hello,

    in my .htaccess file, i have:

    
    RewriteRule ^/css/([A-Za-z0-9-]+)$ http://www.myotherdomain.com/css/$1
    
    Code (markup):
    I use this to link to the stylesheet:
    <link rel="stylesheet" type="text/css" href="css/base.css" media="screen,projection" />
    Code (markup):
    when i browse to:
    http://www.mydomain.com/
    my stylesheet shows up ok, but when i goto a sub folder, mydomain.com/subfolder/ the server is looking for the stylesheet in the /subfolder/css/ folder

    is there a way to go around this by making it so that any reference to css/*.css would point to myotherdomain.com/css/ ?


    Thanks
     
    itssangy, Dec 17, 2007 IP
  2. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #2
    <link rel="stylesheet" type="text/css" href="/css/base.css" media="screen,projection" />
    Code (markup):
     
    joebert, Dec 17, 2007 IP