How to detect that you've been re-directed with mod_rewrite?
Is there a particular header or environment variable th开发者_如何学编程at a request will have set, when it has been redirected by mod_rewrite? I want to put a friendly note to users to update their bookmarks when they're viewing a re-directed resource.
You may want to read up about the X-Forwarded-For header. If you're using mod_proxy in conjunction with mod_rewrite, (i.e., your rewrite rule has the "P" flag to force proxy), this header should be appended to your requests.
精彩评论