Gossamer Forum
Home : General : Internet Technologies :

Perminant Redirect ... httpd.conf

Quote Reply
Perminant Redirect ... httpd.conf
Hi,

I'm trying to get one of my sites to give a 302 perminant redirect, when visiting it without the www. For example: http://foobar.com would go to http://www.foobar.com.

I've tried quite a few times;

Code:
# try 1
redirect permanent courseworkbank.co.uk http://www.courseworkbank.co.uk


Code:
# try 2
ServerName www.courseworkbank.co.uk
redirect permanent courseworkbank.co.uk http://www.courseworkbank.co.uk

Code:
# try 3
ServerAlias *.courseworkbank.co.uk
Redirect permanent / http://www.courseworkbank.co.uk

The syntax isn't giving any errors, but its just not working :|

TIA

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Perminant Redirect ... httpd.conf In reply to
I used to use something like:

Code:
RewriteCond %{HTTP_HOST} ^foobar\.com$
RedirectPermanent / http://www.foobar.com

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Perminant Redirect ... httpd.conf In reply to
Thanks for the reply. Finalyl managed to get it working with a seperate <VirtualHost> entry for it without the www, and then it worked fine :) (just used a "Redirect 302 / http://www.domain.com/")

Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates