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 am changing my domain from to I used a Redirect permanent in my apache config file, and then restarted apache. When I try to access the old domain, I get a 403 error.

This is what my apache config file looks like:

<VirtualHost *:80>
  Redirect permanent /

  DocumentRoot /path/to/project/foo/web
  DirectoryIndex index.php

  # CustomLog with format nickname
  LogFormat "%h %l %u %t \"%r\" %>s %b" common
  CustomLog "|/usr/bin/cronolog /var/log/apache2/" common

  LogLevel notice
  ErrorLog "|/usr/bin/cronolog /var/log/apache2/"

  <Directory />
     Order Deny,Allow
     Deny from all

  <Files ~ "^\.ht">
     Order allow,deny
     Deny from all

  <Directory /path/to/project/foo/web>
      Options -Indexes -Includes
      AllowOverride All
      Allow from All

      RewriteEngine On

      # We check if the .html version is here (cacheing)
      RewriteRule  ^$ index.html [QSA]
      RewriteRule  ^([^.])$ $1.html [QSA]
      RewriteCond  %{REQUEST_FILENAME} !-f

      # No, so we redirect to our front end controller
      RewriteRule  ^(.*)$ index.php [QSA,L]

  <Directory /path/to/project/foo/web/uploads>
     Options -ExecCGI -FollowSymLinks -Indexes -Includes
     AllowOverride None
     php_flag engine off

  Alias /sf /lib/vendor/symfony/symfony-1.3.8/data/web/sf
  <Directory /lib/vendor/symfony/symfony-1.3.8/data/web/sf>

#  Alias /sf /lib/vendor/symfony/symfony-1.4.19/data/web/sf
#  <Directory /lib/vendor/symfony/symfony-1.4.19/data/web/sf>
      Options -Indexes -Includes
      AllowOverride All
      Allow from All


Can anyone spot what I may be doing wrong?. The site does exist so I don't know why this error occurs - help?

share|improve this question

migrated from Dec 1 '12 at 15:39

This question came from our site for pro webmasters.

This configuration file is on and not on, right?Then why don't you remove every thing but the redirect permanent inside this .htaccess? Can you access without getting a 403? – j0k Nov 30 '12 at 9:14
mod_alias is activated, isn't it? ("Redirect" = mod_alias stuff, "RewriteXY" = mod_rewrite stuff). – initall Nov 30 '12 at 11:45
@j0k: I don't understand your statement. I have removed everything else from the config file. the only two directives are ServerName and the Redirect directive. However, I still get a 403 when I try to access, but typing works ... ?! – Homunculus Reticulli Nov 30 '12 at 21:16
@initall: Yes. mod_alias is activated. I don't understand the rest of your comment though, please clarify. – Homunculus Reticulli Nov 30 '12 at 21:56
@HomunculusReticulli like j0k said, comment out Redirect permanent / and see if you get your old site to display. – Anthony Hatzopoulos Dec 3 '12 at 14:23

Your Answer


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

Browse other questions tagged or ask your own question.