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 a url that looks like this: Now, I was wondering how I can tell Apache to redirect the url to

share|improve this question
@quanta Okay thanks. But maybe the word I should have used was Redirect – burntblark Oct 16 '11 at 7:22

The simplest solution is to place a single .htaccess file inside your /folder directory:

<IfModule mod_rewrite.c>

  RewriteEngine On
  RewriteCond %{HTTP_HOST} ^www.example\.com [NC]
  RewriteRule (.*)$1 [R=301,L]


Please note, that your Apache needs to be configured with mod_rewrite

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.