This forum has been moved here:
Helicon Tech Community Forum

Helicon Ape (Forum Locked Forum Locked)
 Helicon Tech : Helicon Ape
Subject Topic: change html body content
Author
Message |
techchif2
Newbie


Joined: 09 March 2008
Posts: 23
Posted: 07 July 2010 at 11:15am

Hi, I need to change all images on html body from src="/images/(.+)"  to  http://www.site2.com/images/$1

I used this code

ReplaceFilterDefine imageRep CaseIgnore intype=text/html
ReplacePattern imageRep "^.*src=(.+){1}(/images/)(.+).*$" "src=$1http://site2.com$2$3"
SetEnv mod_replace imageRep

from httpd.conf
LoadModule replace_module       modules/mod_replace.so

no errors found in error.log
can you check and tell me what wrong ?
thanks


Edited by techchif2 - 11 July 2010 at 9:20am
Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 07 July 2010 at 2:26pm

Hello,
Could you please clarify IIS version. Does Ape work at all? Do you have any record in error.log?

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top Visit Vyacheslav's Homepage
 
techchif2
Newbie


Joined: 09 March 2008
Posts: 23
Posted: 11 July 2010 at 9:34am

I fixed problem of building filter and all works. here is it

ReplaceFilterDefine filter1 CaseIgnore intype=text/html
ReplacePattern filter1 "(=\W)([/\-_\d\w]+)\.(css|gif|jpg|png|js|swf)" "$1http://statics.site2.com$2.$3"
SetEnv mod_replace filter1

it changing source of images from root site to another. But I found that using Server.Transfer("page1.aspx") ignore filter rules and return unfiltered result  
I'm using this function in ASP.NET C# FM 3.5  IIS 7.5 win 7

Error.log file in this case empty

when I used Server.Execute("page1.aspx") it worked.
How can I use Server.Transfer() function here?

Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 12 July 2010 at 10:09am

Hello,
We’re going to test this and will let you know the results.
Thanks.

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top Visit Vyacheslav's Homepage
 
techchif2
Newbie


Joined: 09 March 2008
Posts: 23
Posted: 15 July 2010 at 3:50am

when you planning to release Server.Transfer() fix?
Back to Top
 
Vyacheslav
Admin Group


Joined: 02 July 2008
Location: Ukraine
Posts: 1542
Posted: 21 July 2010 at 9:42am

Hello,
I’m sorry for delay.
You’re right Server.Transfer() doesn’t work, and we still don’t have solution.
Please use Server.TransferRequest instead.
You may find more information here: http://forums.iis.net/p/1146511/1882666.aspx

__________________
Slavik Shynkarenko,
Helicon Tech.
Back to Top Visit Vyacheslav's Homepage
 

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

Printable version Printable version