Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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'm moving a site from a Synology server to another, and want automatic redirect. I have virtual host on the syno, the site is in domain The new site is in This is the httpd-vhost.conf-user file:

NameVirtualHost *:80
<VirtualHost *:80>
ServerName *
DocumentRoot /var/services/web
RewriteLog /volume1/web/logs/rewrite.log

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

<VirtualHost *:80>
DocumentRoot "/var/services/web/bugs"
ErrorDocument 403 "/webdefault/sample.php?status=403"
ErrorDocument 404 "/webdefault/sample.php?status=404"
ErrorDocument 500 "/webdefault/sample.php?status=500"
<Directory />
AllowOverride FileInfo Options
Options FollowSymLinks
Options SymLinksIfOwnerMatch

RewriteEngine on
Options +FollowSymLinks
RewriteRule ^(.∗)$$1 [R=301,L]
ErrorLog "/var/services/web/logs/error-bug.log"


Restart Apache and... Nothing happens, no redirection

The rewrite log says: - - [15/Jul/2010:10:53:41 +0200] [][rid#102f6800/initial] (2) init rewrite engine with requested uri / - - [15/Jul/2010:10:53:41 +0200] [][rid#102f6800/initial] (3) applying pattern '^(.*?)$' to uri '/' - - [15/Jul/2010:10:53:41 +0200] [][rid#102f6800/initial] (1) pass through /

There's nothing in the error.log.

Any help?

share|improve this question
up vote 0 down vote accepted

You need RewriteLogLevel <some_number_greater_than_zero> to turn on logging for what's happening.

share|improve this answer
Thanks, edited the question with the rewrite.log content – CharlesB Jul 15 '10 at 8:51

OK, this was an encoding problem in the configuration file... Redirect now works!

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.