[nzlug] 403 Errors - Virtual Hosts - Apache
Michal Ludvig
michal at logix.cz
Thu Jul 17 17:08:39 NZST 2008
Michal Ludvig wrote:
> Rob wrote:
>
>> # mysite
>> <VirtualHost 0.0.0.0:80>
>> ServerName mysite.co.nz
>> RewriteEngine on
>> RewriteCond %{HTTP_HOST} !^$
>> RewriteRule ^/(.*) http://www.mysite.co.nz/$1 [NE,R]
>> </VirtualHost>
>
> Looks like you want a simple redirect here, don't you?
>
> How about:
> <VirtualHost _default_:80>
> ServerName mysite.co.nz
> RedirectPermanent / http://www.mysite.co.nz/
> </VirtualHost>
Oops, sorry, read the message 2nd time and realised the problem is
something else ;-)
You probably want this:
<VirtualHost _default_:80>
ServerName mysite.co.nz
ErrorDocument 403 http://www.mysite.co.nz/some-403-page.html
</VirtualHost>
Michal
More information about the NZLUG
mailing list