Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know about the HttpRewriteModule, but I don't really know how to handle regex and I would need to redirect all URLs within a certain directory to another, specifically

example.com/component/tag/whatever

to

example.com/tag/whatever

Could some one tell me how to do this in Nginx?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Do you mean something like:

rewrite ^/component(.*)$ $1 last;
share|improve this answer
    
I think this will do it, thank you so much. I'm awful at regular expressions; I will have to try to learn them... –  javipas Aug 18 '11 at 12:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.