Solved

RewriteRule not working for anchors in IE

Posted on 2011-02-10
9
571 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

919 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now