GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   .htaccess Code To Insert Missing WWW (https://gfy.com/showthread.php?t=463252)

Tipsy 05-03-2005 01:43 PM

.htaccess Code To Insert Missing WWW
 
Anyone have some working htaccess code to add the www to a url? The one I have gets pissy with a script I'm trying to setup and I can't find the alternative version I had which should work.

Thanks.

fireorange 05-03-2005 01:48 PM

Code:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteRule (.*) http://www.domain.com/$1 [R=permanent,L]


Tipsy 05-03-2005 01:52 PM

Quote:

Originally Posted by fireorange
Code:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteRule (.*) http://www.domain.com/$1 [R=permanent,L]



That's what I have and it gets a little pissy with a script I have. I'm sure I've seen another way of doing it and even saved it but can't find it now :(

Thanks for the reply though.

swami 05-03-2005 04:36 PM

Are we talking about redirecting the root to the www.alias?
This is what I use
Options +FollowSymLinks -Indexes
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L]


All times are GMT -7. The time now is 11:05 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123