Re: [users@httpd] Apache 2: mod_rewrite

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

 



On 10/15/05, Lars Ohlén <lars@xxxxxxxx> wrote:

> So the same script (ex TheServlet) needs to be accessed both using the URL
>
> /webapp/servlet/TheServlet and
> /script/servlet/TheServlet
>
> The easy solution is of course to duplicate the webapp and to create an
> additional script web application with the same scripts. But
> this is not very good from a maintance point of view (needs to duplicate
> many scripts and helper classes)
>
> But could this not be solved using mod_rewrite?
>
> Simpy to map /script to /webapp
>
> Preferably we would like to control each indivdual script and to have
> mod_rewrite to append some extra information so that the
> script could (if needed) identify if the invocation was from a script of
> from a webapp user.

Something like

RewriteEngine On
RewriteRule /script/servlet/(.*)       /webapp/servlet/$1?script=yes [QSA]

maybe?


Krist

--
krist.vanbesien@xxxxxxxxx
Solothurn, Switzerland

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