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
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
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
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!