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 have inherited a server with a couple of domains on it. The website was reworked within the last two years and I am trying to oblige a request by staff to get a redirect to work properly (if it can given the default structure).

So right now on the server I have a redirect that takes every 301 and dumps it onto the front page of the website.

RedirectMatch /(.)

This has worked well for most of the old URL's coming in from various websites containing the old liking structure.

However, now a staff member wants a single URL which is somewhat widely used to be redirected to it's proper place.

Redirect /new/research/Exp_Rese_Disc/Asia/example.shtml

Is this possible without killing the all encompassing 301 redirect?

To have a general RedirectMatch /(.) redirect as well as a singular redirect?

As of right now it is not seeming to let me. Any ideas, thoughts or examples are much appreciated.

share|improve this question
up vote 1 down vote accepted

You might consider switching to RewriteConf/RewriteRule pairs, it's easier to control the flow of logic.

For instance:

RewriteEngine  on
RewriteCond %(REQUEST_URI) ^/new/research/example.shtml$ [NC]
RewriteRule ^(.*)$ [R=301,L]

RewriteCond %(REQUEST_URI) /(.)
RewriteRule ^(.*)$ [R=302]

#Drop the www
RewriteCond %(HTTP_HOST) !^$ [NC]
RewriteRule ^(.*)$$1 [R=301]

or something along those lines... Apache has several good references on it.

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.