This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Rewrite domain and all pages
Author
Message |
janeloxton
Newbie


Joined: 07 December 2011
Posts: 5
Posted: 07 December 2011 at 4:23am

HI.. am struggling...

Site AA.com has been duplicated exactly to BB.com and all pages below are the same name.

I have managed a global site redirect using IIS from AA.com to BB.com, but all pages on AA.com only go to the home page for BB.com

I would like each page to map onto itself (same name and directory structure)

eg www.aa.com/services/vets.aspx   maps to   www.bb.com/services/vets.aspx

Please can someone help,
Many thanks
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 07 December 2011 at 5:36am

Please try to use the following rules in httpd.ini in the root of site AA:

[ISAPI_Rewrite]
RewriteRule (.*) http\://www\.bb\.com$1 [RP]

__________________
Regards,
Anton
Back to Top
 
janeloxton
Newbie


Joined: 07 December 2011
Posts: 5
Posted: 08 December 2011 at 4:06am

Hi. We removed the IIS global divert and used this code, so thanks for that. unfortunately it didnt work and the original site cannot be found now....

Any more thoughts please?
Back to Top
 
janeloxton
Newbie


Joined: 07 December 2011
Posts: 5
Posted: 08 December 2011 at 5:28am

Does it need a   /   after the .uk and before the $1?

[ISAPI_Rewrite]

RewriteRule (.*) http\://www\.bb\.co\.uk$1 [RP]

THanks
Back to Top
 
janeloxton
Newbie


Joined: 07 December 2011
Posts: 5
Posted: 08 December 2011 at 6:46am

yes - that worked, so now all pages point to their corresponding one on bb.co.uk

[ISAPI_Rewrite]

RewriteRule (.*) http\://www\.bb\.co\.uk/$1 [RP]



EXCEPT

the main landing page

ie  www.aa.co.uk    tries to find  www.bb.co.uk//

so please can you give me the final solution for all files...
Many thanks
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 08 December 2011 at 11:10am

It actually needs to be without slash to work in all cases:

RewriteRule (.*) http\://www\.bb\.co\.uk$1 [RP]

__________________
Regards,
Anton
Back to Top
 
janeloxton
Newbie


Joined: 07 December 2011
Posts: 5
Posted: 20 December 2011 at 6:43am

HI again.
No - this still doesnt work.

I type in url:
www.aa.co.uk  and it returns 
http://www.bb.co.ukeurl.axd/273fdd2d36574a4aa794be5b28ed1f60/

click through from google
aa.co.uk/contactus.aspx
returns
http://www.bb.co.ukcontactus.aspx/     (no slash after .uk/  but one after .aspx which is wrong)

So I need code which
1. maps identical pages from www.aa.co.uk  to www.bb.co.uk
AND
2. maps www.aa.co.uk    and   www.aa.co.uk/   to www.bb.co.uk    or www.bb.co.uk/     (which is the default.aspx page, but which isnt specifically named in the URL)

Thanks again
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 21 December 2011 at 8:28am

I see you are using extension-less URLs in IIS?

Let's try the following way:

[ISAPI_Rewrite]
RewriteRule /? http\://www\.bb\.co\.uk/ [RP]
RewriteRule (.+) http\://www\.bb\.co\.uk/$1 [RP]

__________________
Regards,
Anton
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
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