use mod_rewrite instead of mod_alias directives. then you can use a rewriteCond to avoid the loop.
lucy24
12:04 am on Sep 1, 2014 (gmt 0)
You can use mod_alias (Redirect by that name) to redirect to an URL with a query string. BUT only mod_rewrite can check whether the query already exists. This part is essential when the URL is otherwise unchanged.
If you have existing redirects using mod_alias, you will need to convert all of them to mod_rewrite syntax. Combining mods can have unintended consequences (Apache-speak for "The world will come to an explosive end"). Conversion isn't very hard.
You don't actually need the [NE]; that's mainly for targets containing fragment links (literal # that has to reach the browser in that form).
wilderness
4:09 pm on Sep 1, 2014 (gmt 0)
You don't actually need the [NE]; that's mainly for targets containing fragment links (literal # that has to reach the browser in that form).
Really? Is it possible to redirect the SE's in such a manner?
I've multiple "literal #'s" on same pages. times multiple pages.
The SE's grab the link from a multi-page index, unfortunately and when following-up they only request the page (absent the #).
lucy24
12:05 am on Sep 2, 2014 (gmt 0)
Search engine robots never request fragments, since by their nature they have to get the whole page. But search engines-- at least some of them-- do index fragments. So if your relevant content is halfway down the page, the searcher may be sent directly there. This was easier to see in action just 2-3 years ago, before https google became so ubiquitous. The fragment link doesn't, of course, get sent to your server as a request. But you used to be able to see it on the referer side, where it shows the full URL-plus-fragment of the search result. (If you're checking your own logs, it will come through as %23, not #, since everything in the referer is percent-encoded at least once.)
:: detour to check something in logs ::
Yup :( The only fragment referers I can find that are even slightly recent are from other countries' googles. That doesn't mean it is no longer happening. Just that I can't see it.