Capturing Port Number in ReWriteCond Host:
2 posts
• Page 1 of 1
Capturing Port Number in ReWriteCond Host:
Hi Guys, hope you can help.
We have a website that we want to setup within ISAPI_ReWrite 2.x. The nature of the website means that we want to use non standard ports.
So the URL to get to it is say http://www.abcdefg.com:58000
Our firewall does a port redirection from this address to the reverse proxy server on port 80
The ISAPI_ReWrite takes over with the following rule:
RewriteCond Host: www.abcdefg.com
reWriteRule (.*) http://10.10.10.10:8081$1 [I,P]
However this doesnt work. The log is empty and always have been.
I think it may be because the initial user URL contains port 58000 and this is not included in the ReWriteCond Host: rule? I have tried adding it but it generates a internal server error.
Does anybody know how to do this?
We have a website that we want to setup within ISAPI_ReWrite 2.x. The nature of the website means that we want to use non standard ports.
So the URL to get to it is say http://www.abcdefg.com:58000
Our firewall does a port redirection from this address to the reverse proxy server on port 80
The ISAPI_ReWrite takes over with the following rule:
RewriteCond Host: www.abcdefg.com
reWriteRule (.*) http://10.10.10.10:8081$1 [I,P]
However this doesnt work. The log is empty and always have been.
I think it may be because the initial user URL contains port 58000 and this is not included in the ReWriteCond Host: rule? I have tried adding it but it generates a internal server error.
Does anybody know how to do this?
Re: Capturing Port Number in ReWriteCond Host:
Try this:
RewriteCond Host: www.abcdefg.com(?:\:\d+)
RewriteRule (.*) http\://10.10.10.10\:8081$1 [I,P]
RewriteCond Host: www.abcdefg.com(?:\:\d+)
RewriteRule (.*) http\://10.10.10.10\:8081$1 [I,P]
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 7 guests