Solved

RewriteRule not working for anchors in IE

Posted on 2011-02-10
9
599 Views
Last Modified: 2013-12-08
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
Comment
Question by:royalcyber
9 Comments
 
LVL 5

Expert Comment

by:SimonDard
ID: 34868828
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
 
LVL 13

Expert Comment

by:dsmile
ID: 34869732
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
 

Author Comment

by:royalcyber
ID: 34872360
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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 27

Accepted Solution

by:
BigRat earned 500 total points
ID: 34905917
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
 
LVL 27

Expert Comment

by:BigRat
ID: 34905929
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
 
LVL 27

Expert Comment

by:Tolomir
ID: 35422466
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question