httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrea <>
Subject Re: [users@httpd] Proper functioning of Redirect
Date Thu, 04 Sep 2003 20:51:20 GMT
instead of using Redirect you can use RedirectMatch.

RedirectMatch /foo   /now/letus/be/convoluted/bar

You could ask me know, what's the difference ?

Well taking a look at mod_alias.c I saw:

        if (!use_regex  && !ap_is_url(url) )
            return "Redirect to non-URL";

so if regular expressions are enabled, such as in the case of 
RedirectMatch, then the check of the url is not done.
Later, fixup_redir function, will add the missing 
``'' part.

I'm not too much expert in looking at Apache source code, but that's 
what I saw looking at mod_alias.c

Hope It Helped,
Mr Andrea

Ari Davidow wrote:

> We moved some files (don't ask) and want to redirect people to the new 
> locations. (Yes, we could use Alias so that people don't see the 
> changes, but there is more to it.)
> So, I tried a simple
> Redirect /foo   /now/letus/be/convoluted/bar
> and got a message that the Redirect must always go to a complete URL, 
> e.g.,
> Redirect /foo
> Is there any way around this? Is Alias the only part of mod_alias that 
> doesn't need the protocol and domain to be restated? I guess it 
> doesn't matter--it's only a few characters, and the action is still 
> the same. I just want to be sure I am understanding this correctly.
> ari

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