Redirecting URL to a location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have the following added to default site config (which is otherwise
/etc/apache2/sites-available/default on stock Ubuntu 9.10 apache2),
which sets up a HTML-rewriting reverse proxy to another webserver on
the same host on port 5001:

<VirtualHost *:80>
        DocumentRoot /var/www
...
  #Alias /notes /notes/
  #<Location />
  #  RewriteEngine on
  #  RewriteBase /notes
  #  RewriteCond %{REQUEST_FILENAME} ^/notes$
  #  RewriteRule . /notes/ [L]
  #</Location>
  #<Location /notes>
  #  ProxyPass http://127.0.0.1/notes/
  #  SetOutputFilter  proxy-html
  #  ProxyPassReverse /
  #  ProxyHTMLURLMap  /   /notes
  #  RequestHeader unset Accept-Encoding
  #</Location>
  <Location /notes/>
    ProxyPass http://127.0.0.1:5001/
    SetOutputFilter  proxy-html
    ProxyPassReverse /
    ProxyHTMLURLMap  /   /notes/
    RequestHeader unset Accept-Encoding
  </Location>
</VirtualHost>

Everything works fine, but is there a simple way for me to make /notes
get redirected to /notes/? Is the only way to do this by setting up a
script at /notes? Currently /notes just results in a 404, and only
/notes/ works. You can tell from the commented lines that I tried a
few other things, but they didn't work. I'd also be curious to know
how to make /notes simply behave like /notes/ (instead of explicit
redirect). Thanks in advance for any hints.
--
Yang Zhang
http://yz.mit.edu/

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux