Re: [users@httpd] redirect document root

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

 



On 6/7/05, Heiner.Amthauer@xxxxxxxxxxxxx <Heiner.Amthauer@xxxxxxxxxxxxx> wrote:
> e.g.:
> 
> the login page is at login/main.jsp. It loads a frameset. Generally, some of
> the links are absolute, like /ao_unten.htm, others are relative like
> ../login/login_presubmit.jsp.
> 
> Accessing /login/main.jsp results in
> 
> GET /login/main.jsp HTTP/1.1" 404 332

There is no easy and universal solution to this.  If the number of
absolute links is limited, I would just watch for them in your logs
and add a redirect for each, for example,
Redirect /ao_unten.htm http://yoursite.example.com/ao/ao_unten.htm

Another option is to look at the Referer for requests and tack on an
/ao if the Referer has one but the request doesn't.  But this would be
unreliable given that some percentage of people block the Referer
header.

You could also use mod_rewrite to test to see if the file exists in
the documentroot and, if not, try to access it under /ao/.  There is a
recipe in the RewriteGuide describing how to check in multiple
locations.

There are other possibilities as well (including using something like
mod_publisher to rewrite the links in the pages), but what will work
best for you depends on the exact details of the situation.  If you
can, use the simplest solution above.

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@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