[nzlug] 403 Errors - Virtual Hosts - Apache

Rob bubaphex at gmail.com
Fri Jul 18 14:00:31 NZST 2008


got a message about modiration seams i attached a file so i thought i would
repost with a link instead of attachment

Conf file : http://www.insidiousfix.net/pub/my%20conf%20file.txt

Original Message:
Hey Michal,

thanks for that, i tried but it still didnt work.

i've attached a copy of my conf file, i think something else is conflicting
with it.

cheers

rob

On Thu, Jul 17, 2008 at 5:08 PM, Michal Ludvig <michal at logix.cz> wrote:

> 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
>
> _______________________________________________
> NZLUG mailing list NZLUG at linux.net.nz
> http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
>


More information about the NZLUG mailing list