Re: [users@httpd] help with rewrite rule

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

 



On Tue, 1 Mar 2005 12:07:27 -0600, Ramsey, Robert L
<robert-ramsey@xxxxxxxxx> wrote:
> A user types in http://mysite.com/path/to/file.php.  I want to rewrite
> that so that it goes to:
> 
> /var/www/php/myscript.php
> 
> If I have to put this script in the document root, I can, but would
> prefer not to.  myscript.php then checks in this order:
> 
> 1)  If the file really does exist in /var/www/html/path/to/file.php,
> then change the location to that file.
> 2)  If the file exists as an entry in a database, load the file from the
> database and present that to the user.
> 3)  If the file does not exist in either place, then return 404.

If myscript.php is doing all this work, then all apache needs to do is
make sure the request gets to myscript.php.  Something like this would
work:
AliasMatch (.*)\.php /var/www/php/myscript.php

If that is not what you meant, then please be more specific about
myscript.php is doing and what you want apache to do.

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