Solved

RewriteRule not working for anchors in IE

Posted on 2011-02-10
9
555 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
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…
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 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.

707 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