Page is a not externally linkable
- Browsers
-- Opera Browser Usage and Support
---- Opera, Options +MultiViews and name anchors


pixel_juice - 11:19 am on Nov 14, 2005 (gmt 0)


I'm using content negotiation (htaccess Options +MultiViews) to remove specific file extensions from URLs. This works very well as far as I can tell, however it causes me a minor problem with name anchors within a page.

Let say I have linked to www.example.com/page which is what will be displayed in the visitors address bar.

The actual page is www.example.com/page.htm.

This page includes get data, so lets assume the visitor is on the page www.example.com/page?widget=green

If I put a link on the page such as <a href="#top">Back to top</a>, IE and mozilla will both interpret the link as pointing to www.example.com/page?widget=green#top. However Opera will link to www.example.com/page.htm#top.

I believe this is because of the http header "Content-Location: page.htm" that will be returned with the page request.

I can overcome this behaviour by linking instead to REQUEST_URI#top however I have a couple of questions:

Is Opera's behaviour correct? While the browser is informed of the actual content location, the page does return a 200, so should the original URL not be used? Why would Opera also remove query strings from the link?

Should I give up on multiviews and try to use mod_rewrite instead?


Thread source:: http://www.webmasterworld.com/opera_browser/402.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com