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: IIS5 & 2.5.0.46 to IIS7 & 2.15.1.77 prob.
Author
Message |
java_chris
Newbie


Joined: 21 January 2011
Posts: 3
Posted: 21 January 2011 at 10:23am

Hello Guy's,
We are in a big big migration of system here, and we use the isapi_rewrite.dll to make all of your rewrite runs on the server.

Well the old server use IIS5 with ISAPI_REWRITE.DLL version : 2.5.0.46 (File version 2.4.1.41.) and we migrate all the website to IIS7 With  ISAPI_Rewrite.dll version 2.15.1.77 ( file Version : 2.15.1.76)

Well , if im writing here its because I have some difficulties. To give you the context here , we have an PHP website that is working with rewrite. So the PHP Application have a controller that depends on the HTTP_SERVER_X_REWRITE variable, to make insert on pages. This is a good way to do cute url's for SEO.

Well .... my url are for example  :
http://mywebsite/public/carrieres/

And the rewrite rules in my httpd.ini are :


RewriteCond %HTTPS off
RewriteCond  Host:  (.*)
RewriteCond URL .*(?:/prive|/prive/.*)
RewriteRule (.*)/prive(.*) https://$1$2/prive$3 [I,R,L]

# https on public
RewriteCond %HTTPS on
RewriteCond  Host:  (.*)
RewriteCond URL .*(?:/public|/public/.*)
RewriteRule (.*)/public(.*) http://$1$2/public$3 [I,R,L]

#https on english.
RewriteCond %HTTPS on
RewriteCond  Host:  (.*)
RewriteCond URL .*(?:/en|/en/.*)
RewriteRule (.*)/en(.*) http://$1$2/en$3 [I,R,L]

# all documents
RewriteCond  Host:  (.*)
RewriteCond URL .*(?:/doc/.*)
RewriteCond URL /(?!.*doc/public).*
RewriteCond URL /(?!.*doc/prive).*
RewriteRule (.*)/doc(.*) https://$1$2/doc/public$3 [I,R,L]

ewriteCond URL /(?!.*images/).*
RewriteCond URL /(?!.*schemas/).*
RewriteCond URL /(?!.*media/).*
RewriteCond URL /(?!.*css/).*
RewriteCond URL /(?!.*js/).*
RewriteCond URL /(?!.*cgi-bin/).*
RewriteCond URL /(?!.*sa/).*
RewriteCond URL /(?!.*ss/).*
RewriteCond URL /(?!.*sg/).*
RewriteCond URL /(?!.*sd/).*

RewriteRule (.*) /cgi-bin/index.php [I,L]


Well its supposed to say that Everything is redirect to cgi-bin/index.php except for images, schema , ss,sa,sg .... etc.

This httpd.ini work real fine in the iis5 with the old version of ISAPI Rewrite but it's not working with the new version on iis7.

I just dont understand why and we've got no log's about that so  ... if anybody can help me here , IT would be REALY great because im stock with deadlines here and I just dont figure this out.

Thx

Christian Leclerc.



Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 24 January 2011 at 4:09am

Have you tested if rewriting is working for at all?
Put the following rule on top of your config:

RewriteRule /test http\://www.google.com [I,RP]

And request www.yourdomain.com/test. If you get the Google page, ISAPI_Rewrite is working, if not, please show the error and we'll continue
investigation.

__________________
Regards,
Anton
Back to Top
 
java_chris
Newbie


Joined: 21 January 2011
Posts: 3
Posted: 25 January 2011 at 9:27am

Hello Anton,
First of all thx for the reply its really appreciated.

Well, iv'e try the regex

RewriteRule /test http\://www.google.com [I,RP]

and its work perfect.

the rules that seam to be problematic in my application was :

RewriteRule (.*) /cgi-bin/index.php [I,L]

Back to Top
 
java_chris
Newbie


Joined: 21 January 2011
Posts: 3
Posted: 25 January 2011 at 9:32am

Wah .. sorry,
I think it was a code 17.

My bad !
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