httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] RedirectMatch constant loop
Date Thu, 08 Jul 2004 17:13:01 GMT
On Thu, 08 Jul 2004 12:08:25 -0500, eUTSA eLIB <elibre2@hotmail.com> wrote:
> is there a patch for apache2 that corrects an infinite loop when i use
> Redirect in httpd.conf.  i have gotten three to work, but "RedirectMatch 301
> /Multimedia(.*)   /Services/Multimedia/$1" just will not work, although
> "AliasMatch ..." does work, but i want to inform the client that i have
> moved Multimedia to a new directory ".../htdocs/Services/Multimedia" and is
> no longer in ".../htdocs/Multimedia" although the latter directory still
> exists (it has old files no longer used, but kept for ready use if something
> breaks). Thanks -elibre2-

No need for a patch, just a better configuration.  Try:

RedirectMatch 301 ^/Multimedia(.*) /Services/Multimedia$1

The ^ character assures that it only looks for a match at the
beginning of the url-path, rather than anywhere.

Also, a simple
Redirect 301 /Multimedia /Services/Multimedia
would probably also work and would be a little faster.  In addition,
it is better to specify a full url in the second argument (including
http://hostname...).

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message