I am changing my domain from foo.com to foobar.org. I used a Redirect permanent in my
apache config file, and then restarted
apache. When I try to access the old domain foo.com, I get a 403 error.
This is what my
apache config file looks like:
<VirtualHost *:80>
ServerName foo.com
#ServerAlias www.foo.com
#ServerAdmin
[email protected]
Redirect permanent / http://www.foobar.org/
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/%Y%m.foo.access.log" common
LogLevel notice
ErrorLog "|/usr/bin/cronolog /var/log/apache2/%Y%m.foo.errors.log"
<Directory />
Order Deny,Allow
Deny from all
</Directory>
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
<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>
<Directory /path/to/project/foo/web/uploads>
Options -ExecCGI -FollowSymLinks -Indexes -Includes
AllowOverride None
php_flag engine off
</Directory>
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
</Directory>
</VirtualHost>
Can anyone spot what I may be doing wrong?. The site foobar.org does exist so I don't know why this error occurs - help?