PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > With and without www.
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

With and without www.

Réponse
 
LinkBack Outils de la discussion
Vieux 02/03/2005, 22h31   #1
Geoff Soper
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut With and without www.

At the moment my website is visible with the www. prefix and without
(http://www.geoffsoper.co.uk and http://geoffsoper.co.uk), is there any
way I can divert people requesting
http://geoffsoper.co.uk/anything_at_all to
http://www.geoffsoper.co.uk/anything_at_all using directives in
..htaccess files? I have mod_rewrite available to me.

Thanks,
Geoff

  Réponse avec citation
Vieux 03/03/2005, 06h11   #2
Tim
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: With and without www.

On 2 Mar 2005 14:31:07 -0800,
"Geoff Soper" <geoff.google.nospam@alphaworks.co.uk> posted:

> At the moment my website is visible with the www. prefix and without
> (http://www.geoffsoper.co.uk and http://geoffsoper.co.uk), is there any
> way I can divert people requesting
> http://geoffsoper.co.uk/anything_at_all to
> http://www.geoffsoper.co.uk/anything_at_all using directives in
> .htaccess files? I have mod_rewrite available to me.


I've just done the opposite with my website (I have a really short domain
name, and wanted to keep it that was so I can print it in tight spaces).
This trick (like below) worked for me with removing the www., so I've
reversed it to insist on the www. but not tested it. Try this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^geoffsoper\.co\.uk$ [NC]
RewriteRule ^(.*)$ http://www.geoffsoper.co.uk/$1 [R=301,L]

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
  Réponse avec citation
Vieux 03/03/2005, 11h59   #3
Bernd Muent
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: With and without www.

Geoff Soper schrieb:

> At the moment my website is visible with the www. prefix and without
> (http://www.geoffsoper.co.uk and http://geoffsoper.co.uk), is there any
> way I can divert people requesting
> http://geoffsoper.co.uk/anything_at_all to
> http://www.geoffsoper.co.uk/anything_at_all using directives in
> .htaccess files? I have mod_rewrite available to me.


First step: Ask your provider to route http://geoffsoper.co.uk and
http://www.geoffsoper.co.uk to the same IP.

Second step: Use mod_rewrite:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^geoffsoper\.co\.uk [NC]
RewriteRule ^/(.*) http://www.geoffsoper.co.uk/$1 [R=301,L]

B.

--
BM Computer-Services, Bergmannstr. 66, 10961 Berlin
Webdesign, Internet, Layout und Grafik
Tel.: 030/20649400, mobil 0175/7419517, Fax: 030/20649401
Web: http://www.bmservices.de, eMail: kontakt@bmservices.de
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 09h18.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07998 seconds with 11 queries