1

I have directory named /template/css

The full url is http://sitename.com/template/css

I need this folder to be redirected using apache mod rewrite

from

http://sitename.com/template/css

to:

http://sitename.com/css

How can I do this?

1 Answer 1

5

Why do you need to use mod_rewrite? Why don't you just Alias /css to the location in the filesystem where the CSS files are actually stored?

Assuming that you do have a valid reason for doing this, the following should do the trick:

RewriteEngine On
RewriteRule ^/template/css(.*)$ /css$1

You must log in to answer this question.