Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: non-www to www redirect Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
nulHead
Newbie
Newbie


Joined: 06 October 2008
Location: United States
Online Status: Offline
Posts: 1
Posted: 06 October 2008 at 7:09pm | IP Logged Quote nulHead

Hi there,

I have tried numerous different suggestions found in this forum and on the internet to get http://txsleepmedicine.com to redirect to http://www.txsleepmedicine.com.  I would like also like to accommodate the possibility of url parameters and other paths leading the ".com".

As I mentioned, I have tried numerous things to no avail.  Using the same software I was able to get one of our sites to redirect from www to non-www URL.  Please advise.

Thanks in advance!
David
Back to Top View nulHead's Profile Search for other posts by nulHead
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 07 October 2008 at 3:39am | IP Logged Quote Anton

Please try this config:

RewriteEngine on

RewriteCond %{HTTP:Host} ^txsleepmedicine\.com$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http://www.txsleepmedicine.com%1 [R=301,L]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
nasa
Newbie
Newbie


Joined: 07 October 2008
Online Status: Offline
Posts: 1
Posted: 07 October 2008 at 5:32pm | IP Logged Quote nasa

I'm totally new to  ISAPI_Rewrite and I need to do the same thing, redirect traffic from non-www to www.

Do I add the configuration described above on the  httpd.conf found on the ISAPI_Rewrite folder?  Do I also need a .htaccess file on the root of the web site?

Is there a getting started tutorial? For now I just need to do this non-www to www redirect and I need to know what are the steps I need to take to get this going. I've installed the  ISAPI_Rewrite 3.0 on a dev server but from there I'm not sure what's next.

Thank you!

Back to Top View nasa's Profile Search for other posts by nasa
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 08 October 2008 at 3:56am | IP Logged Quote Anton

If you need to apply non-www to www rules to all sites on your server you should put them into httpd.conf, if you need that only for a
particular site, please put the rulws into .htaccess in the root of the corresponding site:

RewriteEngine on

RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC]
RewriteCond %{REQUEST_URI} (.+)
RewriteRule .? http(?%1s)://www.%2%3 [R=301,L]

Here are links to documentation and FAQ:
http://www.helicontech.com/isapi_rewrite/doc/
http://www.helicontech.com/isapi_rewrite/doc/examples.htm
http://www.helicontech.com/forum/forum_posts-TID-10648.htm


__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum