Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x support forum
 Helicon Tech : ISAPI_Rewrite 2.x support forum
Subject Topic: Simple Alias Rewrite? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
rkeith
Newbie
Newbie


Joined: 07 August 2008
Location: United States
Online Status: Offline
Posts: 9
Posted: 07 August 2008 at 12:26pm | IP Logged Quote rkeith

I'm trying to do a rewrite of a domain alias. I want to direct www.domain-alias.com and domain-alias.com to www.mydomain.com (and all associated pages)

I've already got the redirect for redirecting mydomain.com to www.mydomain.com working fine. What do I need to do for domain aliases?

Back to Top View rkeith's Profile Search for other posts by rkeith
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7598
Posted: 07 August 2008 at 7:38pm | IP Logged Quote Lexey

RewriteCond Host: (?:www\.)domain-alias\.com
RewriteRule (.*) http\://www.mydomain.com$1 [I,RP]
Back to Top View Lexey's Profile Search for other posts by Lexey
 
rkeith
Newbie
Newbie


Joined: 07 August 2008
Location: United States
Online Status: Offline
Posts: 9
Posted: 07 August 2008 at 8:07pm | IP Logged Quote rkeith

Thanks, but that doesn't seem to work. Should the command "RewriteEngine on" preceed these commands? I've tried it both ways.

I of course replaced domain-alias with my aliased domain, and replaced mydomain.com with the domain to be directed to.

I should point out that I'm using rewrite version 3.0, not 2.x, just posted in the wrong forum.

Commands in a .htaccess file in the root directory. As I mentioned, I was able to redirect mydomain.com to www.mydomain.com, so I know it's in the right location and the permissions are fine.

Back to Top View rkeith's Profile Search for other posts by rkeith
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7598
Posted: 09 August 2008 at 11:46am | IP Logged Quote Lexey

This rule is for 2.x only. Better ask your question in the 3.x forum.
Back to Top View Lexey's Profile Search for other posts by Lexey
 

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 cannot vote in polls in this forum