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: permanent redirect Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
lisota
Newbie
Newbie


Joined: 25 July 2008
Online Status: Offline
Posts: 2
Posted: 25 July 2008 at 10:39pm | IP Logged Quote lisota

I am trying to setup a permanent redirect for our old URL. It should include all content and all subdomains. It should also be effective for people who forget the www. in front of the old domain

old URL is www.mywebsite.com

new URL is www.mysite.com

Our ISP runs version 3.0 of ISAPI rewrite.

Any help will be appreciated. I am a total novice on this scripting language.



Edited by lisota - 26 July 2008 at 12:37am
Back to Top View lisota's Profile Search for other posts by lisota
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 28 July 2008 at 3:01am | IP Logged Quote Anton

Please try to use this:

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

__________________
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