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: Domain alias rewrite help 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 1:55pm | 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
 
Anton
Moderator Group
Moderator Group


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

Please try to use the following rule:

RewriteCond %{HTTP_HOST} ^(?:www\.)?domain-alias\.com$ [NC]
RewriteRule (.*) http://www.nydomain.com$1 [NC,R=301,L]


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


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

The redirect works if I go to the domain-alias, however if I go to any pages (eg. domain-alias.com/mypage.asp) I get a can't-find page failure.

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


Joined: 30 January 2007
Location: Ukraine
Online Status: Online
Posts: 4837
Posted: 11 August 2008 at 3:11am | IP Logged Quote Anton

Please provide rewrite log records for a specific request.


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


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

Where do I get the rewrite logs? Is this something separate from the site log files? Is this something that has to be setup within the  .httpaccess file? Just not sure what you need.
Back to Top View rkeith's Profile Search for other posts by rkeith
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Online
Posts: 4837
Posted: 13 August 2008 at 3:32am | IP Logged Quote Anton

Please put the following directive into httpd.conf to enable logging:
RewriteLogLevel 9
The rewrite.log will appear in the installation directory of ISAPI_Rewrite.


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


Joined: 07 August 2008
Location: United States
Online Status: Offline
Posts: 9
Posted: 13 August 2008 at 10:19am | IP Logged Quote rkeith

Problem was in the orginal code provided:

RewriteCond %{HTTP_HOST} ^(?:www\.)?domain-alias\.com$ [NC]
RewriteRule (.*) http://www.nydomain.com$1 [NC,R=301,L]

The 2nd line is missing a slash. Should be nydomain.com/$1

Was trying to remap domain-alias.com/mypage.xxx to mydomain.commypage.xxx

Adding the slash corrected the problem

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

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