Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to redirect all urls starting with to

some examples of the files I'm trying to redirect are ...

my current condition is very simple and it is doing everything except for removing the parameter in the url.

RewriteRule ^online/(.*) [R=301,L]

right now this rule will redirect


instead of redirecting to
share|improve this question

From apache docs:

Modifying the Query String

By default, the query string is passed through unchanged. You can, however,
create URLs in the substitution string containing a query string part.
Simply use a question mark inside the substitution string to indicate that
the following text should be re-injected into the query string. When you want
to erase an existing query string, end the substitution string with just a
question mark. To combine new and old query strings, use the [QSA] flag.

So -- try: RewriteRule ^online/(.*) [R=301,L]

share|improve this answer

Your Answer


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.