Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: Possible to Hide Port in URL? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
pman
Newbie
Newbie


Joined: 23 April 2008
Online Status: Offline
Posts: 9
Posted: 23 April 2008 at 3:32pm | IP Logged Quote pman

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 View pman's Profile Search for other posts by pman
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 3556
Posted: 24 April 2008 at 4:14am | IP Logged Quote Anton

Please try the following:

RewriteCond %{HTTP_HOST} ^www\.domain\.com$
RewriteRule ^(.*)$ http://www.domain.com:8080$1 [NC,L]


__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
pman
Newbie
Newbie


Joined: 23 April 2008
Online Status: Offline
Posts: 9
Posted: 24 April 2008 at 12:40pm | IP Logged Quote pman

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 View pman's Profile Search for other posts by pman
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 3556
Posted: 25 April 2008 at 4:44am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
pman
Newbie
Newbie


Joined: 23 April 2008
Online Status: Offline
Posts: 9
Posted: 25 April 2008 at 9:25am | IP Logged Quote pman

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 View pman's Profile Search for other posts by pman
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 3556
Posted: 28 April 2008 at 2:49pm | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 
pman
Newbie
Newbie


Joined: 23 April 2008
Online Status: Offline
Posts: 9
Posted: 28 April 2008 at 6:40pm | IP Logged Quote pman

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 View pman's Profile Search for other posts by pman
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6451
Posted: 30 April 2008 at 7:19am | IP Logged Quote Yaroslav

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 View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
pman
Newbie
Newbie


Joined: 23 April 2008
Online Status: Offline
Posts: 9
Posted: 30 April 2008 at 8:34am | IP Logged Quote pman

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 View pman's Profile Search for other posts by pman
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6451
Posted: 01 May 2008 at 6:33am | IP Logged Quote Yaroslav

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 View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
pman
Newbie
Newbie


Joined: 23 April 2008
Online Status: Offline
Posts: 9
Posted: 06 May 2008 at 8:45pm | IP Logged Quote pman

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 View pman's Profile Search for other posts by pman
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6451
Posted: 07 May 2008 at 9:00am | IP Logged Quote Yaroslav

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 View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
pman
Newbie
Newbie


Joined: 23 April 2008
Online Status: Offline
Posts: 9
Posted: 07 May 2008 at 9:15am | IP Logged Quote pman

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 View pman's Profile Search for other posts by pman
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6451
Posted: 08 May 2008 at 7:19am | IP Logged Quote Yaroslav

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 View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
pman
Newbie
Newbie


Joined: 23 April 2008
Online Status: Offline
Posts: 9
Posted: 08 May 2008 at 8:35am | IP Logged Quote pman

Ok, thanks a lot for all of your help.
Back to Top View pman's Profile Search for other posts by pman
 
pman
Newbie
Newbie


Joined: 23 April 2008
Online Status: Offline
Posts: 9
Posted: 16 May 2008 at 10:23am | IP Logged Quote pman

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 View pman's Profile Search for other posts by pman
 
mattsalmon
Newbie
Newbie


Joined: 24 May 2007
Location: United Kingdom
Online Status: Offline
Posts: 4
Posted: 09 June 2008 at 8:24am | IP Logged Quote mattsalmon

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 View mattsalmon's Profile Search for other posts by mattsalmon
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 3556
Posted: 10 June 2008 at 3:48am | IP Logged Quote Anton

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 View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
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