• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 634
  • Last Modified:

RewriteRule not working for anchors in IE

We are using the following rule in Apache.

We have issue in IE, it's going to "ProgramResource" page but not under "eCPS Culinary" section. But in Firefox it's working fine!

RewriteEngine on

RewriteCond %{HTTP_HOST} ^ecps-culinary.com$
RewriteRule ^/$ http://www.ecps-culinary.com/wps/portal/eCPS/root/ProgramResources/#ecps [L,R,NE]

RewriteCond %{HTTP_HOST} ^www.ecps-culinary.com$
RewriteRule ^/$ http://www.ecps-culinary.com/wps/portal/eCPS/root/ProgramResources/#ecps [L,R,NE]
0
royalcyber
Asked:
royalcyber
1 Solution
 
SimonDardCommented:
When Firefox finds a server is not responding, it automatically tries a few variations by adding a few commonly used prepends, of which www is one. For example: when your trying to connect to http://site.com and it's not responding because the server you're trying to connect to is not configured to respond to that name, Firefox will try to connect to http://www.site.com . Other browsers however, will not. Maybe that's part of the problem?
0
 
dsmileCommented:
Try

RewriteEngine on

RewriteCond %{HTTP_HOST} ^ecps-culinary.com$
RewriteRule ^/$ http://www.ecps-culinary.com/wps/portal/eCPS/root/ProgramResources#ecps [L,R,NE]

RewriteCond %{HTTP_HOST} ^www.ecps-culinary.com$
RewriteRule ^/$ http://www.ecps-culinary.com/wps/portal/eCPS/root/ProgramResources#ecps [L,R,NE]
0
 
royalcyberAuthor Commented:
Thanks dsmile, I tried your suggestion but still its give teh same result in IE.

Please let me know if you have nay other suggestions. Thanks,
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
BigRatCommented:
With pure C code and sockets I did an HTTP GET request : http://ecps-culinary.com and got back :-

HTTP/1.1 302 Found
DATE:Wed, 16 Feb 2011 11:59:00 GMT
SERVER:IBM_HTTP_Server
LOCATION:http://www.ecps.ca/wps/portal/eCPS/root/ProgramResources#ecps
VARY:Accept-Encoding
CONTENT-ENCODING:gzip
CONTENT-LENGTH:261
CONNECTION:close
CONTENT-TYPE:text/html; charset=iso-8859-1

which is what you'd expect from Apache, the redirect, EXCEPT, that the web site to which we are going is in Canada!

So when I resolve the two addresses involved I get :-

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\rd\IDE>nslookup ecps.ca
Nicht autorisierte Antwort:
Name:    www.ecps.ca
Address:  174.143.231.50

C:\rd\IDE>nslookup ecps-culinary.com
Nicht autorisierte Antwort:
Name:    ecps-culinary.com
Address:  174.143.231.50

which are the same, so it is no wonder that the redirect goes to the wrong address!

However if you resolve the www addresses :-

C:\rd\IDE>nslookup www.ecps-culinary.com
Nicht autorisierte Antwort:
Name:    www.ecps-culinary.com
Address:  174.143.231.50

C:\rd\IDE>nslookup www.epcs.ca
Nicht autorisierte Antwort:
Name:    www.epcs.ca
Address:  216.8.179.24

So somewhere there's a DNS entry which is wrong.
0
 
BigRatCommented:
PS: Anyone of these HTTP Spy programs, like httpLook, can show you exactly what the server is sending, which is far more valuable than relying on browser behavior which varies from release to release.
0
 
TolomirAdministratorCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now