| Author |
|
pman Newbie

Joined: 23 April 2008
Online Status: Offline Posts: 9
|
| Posted: 23 April 2008 at 3:32pm | IP Logged
|
|
|
Hi,
We had a third party come in and install our outsourced website on our web server. The site runs under Zope on port 8080. All our urls start like this: http://domainname:8080/...
Can ISAPI_REWRITE change the URL to look like this: http://domainname/... thus hiding the port but still allow the site to run on port 8080?
Our server is an AMD 64-bit Windows 2003 R2 running IIS6 and ISAPI_REWRITE 64.
Thanks in advance.
Paul
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 3556
|
| Posted: 24 April 2008 at 4:14am | IP Logged
|
|
|
Please try the following:
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ RewriteRule ^(.*)$ http://www.domain.com:8080$1 [NC,L]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
pman Newbie

Joined: 23 April 2008
Online Status: Offline Posts: 9
|
| Posted: 24 April 2008 at 12:40pm | IP Logged
|
|
|
Ok, I finally got it to work, but it still displays the 8080 in the URL. Is there a way to show the URL without the 8080?
Thanks
Paul
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 3556
|
| Posted: 25 April 2008 at 4:44am | IP Logged
|
|
|
Please try to use this:
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ RewriteRule ^(.*)$ http://www.domain.com:8080$1 [NC,R] RewriteRule ^(.*)$ http://www.domain.com$1 [NC,L]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
pman Newbie

Joined: 23 April 2008
Online Status: Offline Posts: 9
|
| Posted: 25 April 2008 at 9:25am | IP Logged
|
|
|
I don't think it is doing the second rewrite rule, here is what shows in the log:
[rid#41233640/initial] (2) init rewrite engine with requested uri / [rid#41233640/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf [rid#41233640/initial] (1) Htaccess process request d:\{path to web site}\.htaccess [rid#41233640/initial] (3) applying pattern '^(.*)$' to uri '/' [rid#41233640/initial] (4) RewriteCond: input='www.domain.com' pattern='^www\.domain\.com$' => matched [rid#41233640/initial] (1) escaping http://www.domain.com:8080/ [rid#41233640/initial] (2) explicitly forcing redirect with http://www.domain.com:8080/ [rid#41233640/initial] (2) internal redirect with / [INTERNAL REDIRECT]
Is what I am trying to do even possible?
Thanks for helping out.
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 3556
|
| Posted: 28 April 2008 at 2:49pm | IP Logged
|
|
|
Please try to use the following:
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ RewriteProxy ^(.*)$ http://www.domain.com:8080$1 [NC,L]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
pman Newbie

Joined: 23 April 2008
Online Status: Offline Posts: 9
|
| Posted: 28 April 2008 at 6:40pm | IP Logged
|
|
|
Now it just says cannot display web page. See log below.
applying pattern '^(.*)$' to uri '' RewriteCond: input='www.domain.com' pattern='^www\.domain\.com$' => matched escaping http://www.domain:8080 forcing proxy-throughput with /x.rwhlp?p=0 go-ahead with proxy request /x.rwhlp?p=0 [OK] rewrite '' -> '/x.rwhlp?p=0' internal redirect with /x.rwhlp?p=0 [INTERNAL REDIRECT]
Thanks for trying.
Edited by pman - 29 April 2008 at 9:26am
|
| Back to Top |
|
| |
Yaroslav Moderator Group

Joined: 15 August 2002
Online Status: Offline Posts: 6451
|
| Posted: 30 April 2008 at 7:19am | IP Logged
|
|
|
What exact error it is reporting?
Please read "Premissions required to run ISAPI_Rewrite" in troubleshooting section. Your proxy module is not configred correctly. Probably it has insufficient permissions to run.
__________________ Yaroslav Govorunov,
Helicon Tech
|
| Back to Top |
|
| |
pman Newbie

Joined: 23 April 2008
Online Status: Offline Posts: 9
|
| Posted: 30 April 2008 at 8:34am | IP Logged
|
|
|
The site is working, but it always displays the port in the url. I just want ISAPI_Rewrite to remove the port from the URL since the site is not running on port 80. There are no errors.
Is it possible to remove the port from the URL if it is running on a port other than 80? That is the problem we are trying to address and were told by this third party that ISAPI_Rewrite would solve.
Thanks.
|
| Back to Top |
|
| |
Yaroslav Moderator Group

Joined: 15 August 2002
Online Status: Offline Posts: 6451
|
| Posted: 01 May 2008 at 6:33am | IP Logged
|
|
|
ISAPI_Rewrite does not removes port number form URL, it proxies requests from one web site (server) to another, do you see the difference?
Probably remove web site returns redirect to absolute location with port number or it returns page with absolute links. Information you provided is insufficient to troulbeshoot your problem. Please show your ISAPI_Rewrite web server in action, so we can analyze response.
__________________ Yaroslav Govorunov,
Helicon Tech
|
| Back to Top |
|
| |
pman Newbie

Joined: 23 April 2008
Online Status: Offline Posts: 9
|
| Posted: 06 May 2008 at 8:45pm | IP Logged
|
|
|
I'm not sure what other information I can provide.
Are you saying that what we are trying to do is not possible with Isapi rewrite?
|
| Back to Top |
|
| |
Yaroslav Moderator Group

Joined: 15 August 2002
Online Status: Offline Posts: 6451
|
| Posted: 07 May 2008 at 9:00am | IP Logged
|
|
|
I need to see the problem in action (online). Please provide me with URL to problematic page and instructions how to reproduce the problem.
__________________ Yaroslav Govorunov,
Helicon Tech
|
| Back to Top |
|
| |
pman Newbie

Joined: 23 April 2008
Online Status: Offline Posts: 9
|
| Posted: 07 May 2008 at 9:15am | IP Logged
|
|
|
Go to http://x.x.x.x and the rewrite tool will add the port 8080 to the end of each link. We want to redirect to :8080 without showing that in the url.
Thanks for looking at it. If you need any log files or something, just let me know.
Edited by pman - 16 May 2008 at 10:12am
|
| Back to Top |
|
| |
Yaroslav Moderator Group

Joined: 15 August 2002
Online Status: Offline Posts: 6451
|
| Posted: 08 May 2008 at 7:19am | IP Logged
|
|
|
ISAPI_Rewrite cannot change links on pages thus it cannot add port 8080 to your links. It is your server application put these links on pages.
__________________ Yaroslav Govorunov,
Helicon Tech
|
| Back to Top |
|
| |
pman Newbie

Joined: 23 April 2008
Online Status: Offline Posts: 9
|
| Posted: 08 May 2008 at 8:35am | IP Logged
|
|
|
Ok, thanks a lot for all of your help.
|
| Back to Top |
|
| |
pman Newbie

Joined: 23 April 2008
Online Status: Offline Posts: 9
|
| Posted: 16 May 2008 at 10:23am | IP Logged
|
|
|
Anton wrote:
Please try to use the following:
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ RewriteProxy ^(.*)$ http://www.domain.com:8080$1 [NC,L] |
|
|
Just so you know, the above suggestion worked once the Zope programmers gave us the correct URL to place in the RewriteProxy rule.
Thanks for all your help, we just purchased a license.
|
| Back to Top |
|
| |
mattsalmon Newbie

Joined: 24 May 2007 Location: United Kingdom
Online Status: Offline Posts: 4
|
| Posted: 09 June 2008 at 8:24am | IP Logged
|
|
|
This post describes exactly the requirement I'm trying to meet. I'm using the 'Lite' version at the moment, and according to the docs this version doesn't support proxying.
Does anyone know whether it's possible to achieve the same result without using Proxying (ie just using the Lite version)? The resource is on the same server as the request is coming to, it's just being served over a different port.
|
| Back to Top |
|
| |
Anton Moderator Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 3556
|
| Posted: 10 June 2008 at 3:48am | IP Logged
|
|
|
You can use redirect, but it will not hide the port:
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ RewriteRule ^(.*)$ http://www.domain.com:8080$1 [NC,R,L]
Otherwise you need to use proxy.
__________________ Regards,
Anton
|
| Back to Top |
|
| |