Mod rewrite - can it tell if a requested file exists

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

 



Apache 2.2

 

I know it is possible to chain mod rewrite rules.  Is it possible with mod rewrite to test for the existence of a requested file?  

 

Example:

 

Requested URL: http://acme.com/abc/123

 

Sudo Code:

 

If the URL matches /abc/*

  Then rewrite the URL to /zzz/abc/123

    if the file exists then done (leave the requested file as /zzz/abc/123)

    else if it does not exist

     then rewrite the URL to /xxx/abc/123 then done

 

Is this possible?  If not then how could you do this as fast as possible without creating a mod for apache?

 

Thanks,

 

 

Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu

 


[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