Redirecting a dynamic location to it's real location

Discussion in 'Apache' started by Silver89, Jan 23, 2010.

  1. #1
    I'm developing a system that will allow users to add more templates but the default location will be:

    http://www.domain.com/template/default/css/main.css

    However the file will be accessed using:

    http://www.domain.com/css/main.css

    I'm trying to use the following but having no luck and just receiving can't be found errors:

    
    RewriteCond %{REQUEST_URI} ^template/([a-z]+)/css/main.css
    RewriteRule css/main.css$ template/%1/css/main.css [L,QSA]
    
    Code (markup):
     
    Silver89, Jan 23, 2010 IP