This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: 301 redirect gives eurl.axd error
Author
Message |
danwednesday
Groupie


Joined: 30 November 2007
Posts: 55
Posted: 05 March 2012 at 11:15am

Hi,

I have a website on a dedicated server, running Umbraco
CMS (requires ASP.NET4). The domain name is about to
change, so I've set up a duplicate of this site on a new
server, on a new domain name. Both are currently
running, but I want to 301 redirect everything from the
old to the new domain.

I've set up a script like this:

#Permanent redirect to update old links
#RewriteRule (.*)eurl.axd/.* $1
RewriteRule (.+) http://www.newsite.co.uk$1 [R=301,L]

It redirects, but it sends the user to an error page with
a URL like this:

http://www.newsite.co.ukeurl.axd/5e42bf571e13754bbed8710d
2d377a5d/

Apparently the 'eurl.axd' stuff is related to ASP.NET 4's
inherent URL rewriting, but the only solutions I've found
elsewhere to tackling this either involve disabling
asp.net4 (which is required!) or adding the line which is
commented in my snipped above which removes the eurl
stuff from the redirect string, but when I apply this the
redirect doesn't do anything - it just stops redirecting
anywhere.

Can anyone please tell me how to get website A to
redirect to website B without errors?

Thanks folks!
Back to Top
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 06 March 2012 at 5:00am

Hello,

Why don't we try to combine these two rule as in following:

Code:
RewriteRule (.*)eurl.axd/.* http://www.newsite.co.uk/$1 [R=301,L]


In case this doesn't help, provide error.log and rewrite.log for testing request.
Logging issues described in FAQ

Regards
Andrew
Back to Top
 
danwednesday
Groupie


Joined: 30 November 2007
Posts: 55
Posted: 06 March 2012 at 5:51am

Thanks,

This resolves the issue for the homepage, but none of the
other pages (e.g. www.oldsite.co.uk/page1.aspx) redirect.
I need to redirect everything from old to new:

www.oldsite.co.uk -> www.newsite.co.uk
www.oldsite.co.uk/ -> www.newsite.co.uk/
www.oldsite.co.uk/test.htm -> www.newsite.co.uk/test.htm
www.oldsite.co.uk/section/page.aspx ->
www.newsite.co.uk/section/page.aspx

Many thanks - I really appreciate your help on this!
Back to Top
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 06 March 2012 at 5:56am

Please, provide rewrite.log. This will give us all answers.

Regards
Andrew
Back to Top
 
danwednesday2
Newbie


Joined: 06 March 2012
Posts: 2
Posted: 06 March 2012 at 6:22am

I've added the error logging script to the .htaccess
file, so the complete file now looks like this:


# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.66

RewriteEngine on


#enabling rewrite.log
RewriteLogLevel 9
#enabling error.log
LogLevel debug

#Permanent redirect to update old links
RewriteRule (.*)eurl.axd/.* http://www.newsite.co.uk/$1
[R=301,L]


When I request in the browser:
http://www.oldsite.co.uk/testpage.aspx it just loads that
page when I want it to redirect to
http://www.newsite.co.uk/testpage.aspx. It also logs
nothing in the error or rewrite logs when doing this.
The error.log file and Rewrite.log files are literally
empty.

(Had to register as a new user here to be able to post
this - it was telling me I was spamming the forum for
posting a third time in 24 hours!)

Edited by danwednesday2 - 06 March 2012 at 7:39am
Back to Top
 
danwednesday2
Newbie


Joined: 06 March 2012
Posts: 2
Posted: 06 March 2012 at 9:29am

Do you know what the issue might be here? Should the rule
redirect everything? If so then is there a something I can
check to see why the logging isn't working?
Back to Top
 
danwednesday
Groupie


Joined: 30 November 2007
Posts: 55
Posted: 07 March 2012 at 3:52am

Can anyone help with this? I have a very anxious client!

I have the Pro version of this product - is it possible to
get support somehow?

Thanks to anyone who can help me solve this...
Back to Top
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 07 March 2012 at 5:10am

Firstly, you add logging lines to httpd.conf!, not .htaccess.

We have certain timeshift, as we're located at +2GMT. This is a free support available to anyone. In case you need everything done for you, please, consider Premium Support Plan

Regards
Andrew
Back to Top
 
danwednesday
Groupie


Joined: 30 November 2007
Posts: 55
Posted: 07 March 2012 at 6:12am

Thanks Andrew, I didn't mean to annoy anyone, so sorry if
it's come across that way. I'm just struggling with this
and under pressure from the client as they're currently
running two identical live domains (which is very risky
from a search engine point of view). I didn't anticipate
it'd be a difficult thing to do, but nor did I appreciate
the time difference with you guys either, so sorry if
I've sounded unnecessarily demanding. I've always had
really useful help from this forum - for me it's what
makes the product better than other similar ones.

Okay, so I've now enabled logging in the correct file
(thanks for pointing out how to solve this). I made a
request to:

http://www.oldsite.co.uk/technical.aspx

There was nothing in the error log for this, but the
rewrite log says:


77.103.135.123 77.103.135.123 Wed, 07-Mar-2012 12:08:12
GMT [www.oldsite.co.uk/sid#26702][rid#20392488/initial]
(2) init rewrite engine with requested uri
/technical.aspx
77.103.135.123 77.103.135.123 Wed, 07-Mar-2012 12:08:12
GMT [www.oldsite.co.uk/sid#26702][rid#20392488/initial]
(1) Htaccess process request C:\Program
Files\Helicon\ISAPI_Rewrite3\httpd.conf
77.103.135.123 77.103.135.123 Wed, 07-Mar-2012 12:08:12
GMT [www.oldsite.co.uk/sid#26702][rid#20392488/initial]
(1) Htaccess process request
c:\inetpub\vhosts\oldsite.co.uk\httpdocs\.htaccess
77.103.135.123 77.103.135.123 Wed, 07-Mar-2012 12:08:12
GMT [www.oldsite.co.uk/sid#26702][rid#20392488/initial]
(3) applying pattern '(.*)eurl.axd/.*' to uri
'technical.aspx'


In the browser, it didn't seem to redirect, it just did
loaded the page on the oldsite.co.uk domain.


If you could shed any light on this it would be massively
appreciated.

Thanks again
Back to Top
 
HeliconA
Admin Group


Joined: 02 March 2012
Posts: 4142
Posted: 07 March 2012 at 6:37am

Well, according to the log, the request didn't meet the requesrements:

Code:
(2) init rewrite engine with requested uri /technical.aspx
(1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf
(1) Htaccess process request c:\inetpub\vhosts\oldsite.co.uk\httpdocs\.htaccess
(3) applying pattern '(.*)eurl.axd/.*' to uri 'technical.aspx'


Regards
Andrew
Back to Top
 
danwednesday
Groupie


Joined: 30 November 2007
Posts: 55
Posted: 07 March 2012 at 6:59am

Okay, thanks. I guess I'll try somewhere else then.
Back to Top
 
danwednesday
Groupie


Joined: 30 November 2007
Posts: 55
Posted: 09 March 2012 at 7:26am

In the interests of being helpful and useful for others...

The solution was to ditch ISAPI_Rewrite and delete all
files from the old domain, turn off any ASP.NET
functionality, then set up a simple permanent redirect
directly in IIS, which maps all old resources to the new
domain. Problem solved!
Back to Top
 

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

Printable version Printable version