httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Gingras <>
Subject Re: [users@httpd] htaccess redirect URL fragment problem with Safari browser
Date Wed, 05 Nov 2008 20:48:58 GMT

Apparently, you didn't listen to my last reply. Let me put into very 
simple words:

1) There is a redirection happening from '' to 
'', and it's using mod_rewrite.

  - Apache sees that you accessed, and tells you no, I'd 
rather you use instead. It performs a redirect to
  - Since, as I stated now 5 times, mod_rewrite cannot capture or 
preserve the anchor in the process, the resulting URL will NOT end with 

2) At this point, we're at (without the #acc at the 
end, as explained in point 1). It's lost. You can't get it back.

3) If you wanted to jump to the anchor, use 
directly. It'll bypass the mod_rewrite redirection, and work as 
expected. I tested it here under OSX 10.4.

There is no 'wishful thinking' in this process, whatsoever.

Robert T Wyatt wrote:
> Hi Frank,
> I appreciate the fact that you seem to know all the answers and are
> willing to share them, but apparently you never tried this link with
> Safari as compared with any other browser:
> I do understand why the redirection (mod_rewrite) is not supposed to
> work now thanks to this discussion. Personally, I think Eric is onto
> something with the fact that some browsers store the anchor but Safari
> does not (and should not).
> In my own defense, I believe that "my misconceptions" could be better
> referred to as "my wishful thinking."
> Best,
> Robert
> Frank Gingras wrote:
>> Robert,
>> The issue is simple here: The site automatically
>> redirects to with mod_rewrite (see
>> As you
>> know, and as I explained to you several times now, mod_rewrite cannot
>> see or capture the initial anchor, so it cannot use it in the redirection.
>> The resulting URL is then
>> (notice the stripped anchor).
>> If you were to access
>> directly, every browser would jump directly to the anchor without a
>> problem.
>> Frank
>> Robert T Wyatt wrote:
>>> Here's the link:
>>> You'll find that you are successfully redirected on every browser
>>> except Safari to:
>>> (on Safari you wind up at:
>>> as
>>> predicted by the documentation)
>>> I'll come back to the other comments after a meeting I'm attending.
>>> Thanks for your input and efforts,
>>> Robert
>>> Frank Gingras wrote:
>>>> Robert,
>>>> Your first quote simply states that the characters after the hash sign
>>>> cannot be extracted by mod_rewrite. Nothing else. That guide even gives
>>>> you a workaround.
>>>> The second link can be circumvented with the [NE] flag. In any case, try
>>>> this simple ruleset on your server (directly in one of your vhosts, or
>>>> in the main configuration, if you don't have vhosts):
>>>> RewriteEngine on
>>>> RewriteRule ^/foo
>>>> It works with FF, IE, Konq, and many more browsers.
>>>> Your 'does not work' claim is dubious at best. How about you give us a
>>>> link to a page where the rewriting takes place, and we'll try to open it
>>>> with Safari from here?
>>>> Frank

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message