[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-httpd-users
Subject: Re: [users@httpd] Redirecting URL to a location
From: Luc Bastiaenssen <luc.bastiaenssen () ua ! ac ! be>
Date: 2010-04-28 8:08:45
Message-ID: 4BD7ED0D.6020504 () ua ! ac ! be
[Download RAW message or body]
Another way to consider is to use a redirect like this:
RedirectMatch permanent ^/notes([/]*)$ /notes/
Luc
On 28/04/2010 9:06, Igor Cicimov wrote:
> On the second thought this should work (tested):
>
> <Location /notes>
> DirectorySlash On
> </Location>
>
> Any way, shouldn't the trailing slash automatically be added by
> mod_dir starting from apache2.0.5?
>
> Igor
>
> On Wed, Apr 28, 2010 at 4:51 PM, Edgar Frank <ef-lists@email.de
> <mailto:ef-lists@email.de>> wrote:
>
> 2010/04/28 Yang Zhang
> >Everything works fine, but is there a simple way for me to make
> >/notes get redirected to /notes/?
>
> Hi,
>
> first - IIRC you can't rewrite inside a location. Secondly - you
> want the PT-Flag in your rewrite rule. This allows the
> Location-handler to kick in after the rewrite - otherwise the URL
> respectively the result of the rewrite is considered as "mapped
> to filespace".
>
> Regards,
> Edgar
>
> ---------------------------------------------------------------------
> 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
> <mailto:users-unsubscribe@httpd.apache.org>
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> <mailto:users-digest-unsubscribe@httpd.apache.org>
> For additional commands, e-mail: users-help@httpd.apache.org
> <mailto:users-help@httpd.apache.org>
>
>
--
[Attachment #3 (multipart/related)]
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Another way to consider is to use a redirect like this:<br>
<br>
RedirectMatch permanent ^/notes([/]*)$ /notes/<br>
<br>
Luc<br>
<br>
On 28/04/2010 9:06, Igor Cicimov wrote:
<blockquote
cite="mid:n2pf89deef01004280006v798d3da9ma059f606b94fb7e8@mail.gmail.com"
type="cite">On the second thought this should work (tested):<br>
<br>
<Location /notes><br>
DirectorySlash On<br>
</Location><br>
<br>
Any way, shouldn't the trailing slash automatically be added by mod_dir
starting from apache2.0.5?<br>
<br>
Igor<br>
<br>
<div class="gmail_quote">On Wed, Apr 28, 2010 at 4:51 PM, Edgar Frank
<span dir="ltr"><<a moz-do-not-send="true"
href="mailto:ef-lists@email.de">ef-lists@email.de</a>></span> wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;">2010/04/28 Yang Zhang<br>
<div class="im">>Everything works fine, but is there a simple
way for me to make<br>
>/notes get redirected to /notes/?<br>
<br>
</div>
Hi,<br>
<br>
first - IIRC you can't rewrite inside a location. Secondly - you<br>
want the PT-Flag in your rewrite rule. This allows the<br>
Location-handler to kick in after the rewrite - otherwise the URL<br>
respectively the result of the rewrite is considered as "mapped<br>
to filespace".<br>
<br>
Regards,<br>
<font color="#888888">Edgar<br>
</font>
<div>
<div class="h5"><br>
---------------------------------------------------------------------<br>
The official User-To-User support forum of the Apache HTTP Server
Project.<br>
See <URL:<a moz-do-not-send="true"
href="http://httpd.apache.org/userslist.html" \
target="_blank">http://httpd.apache.org/userslist.html</a>> for more info.<br>
To unsubscribe, e-mail: <a moz-do-not-send="true"
href="mailto:users-unsubscribe@httpd.apache.org">users-unsubscribe@httpd.apache.org</a><br>
" from the digest: <a moz-do-not-send="true"
href="mailto:users-digest-unsubscribe@httpd.apache.org">users-digest-unsubscribe@httpd.apache.org</a><br>
For additional commands, e-mail: <a moz-do-not-send="true"
href="mailto:users-help@httpd.apache.org">users-help@httpd.apache.org</a><br>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<img src="cid:part1.04000303.07050802@ua.ac.be" border="0"></div>
</body>
</html>
["emailbanner.png" (image/png)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic