Re: Config for a PHP REST web service

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

 



 On 07/22/2010 10:50 PM, Simone Caruso wrote:
On 22/07/2010 19:31, Fredric Fredricson wrote:
> Hi all,
> I am working on a small REST-based web service that I write in php.
> I have a single PHP-script and I want Apache to route all requests to a specific location and below to my php script.
>
did u try mod_rewrite?
RewriteRule ^(.*)$ /YOURSCRIPTPATH/index.php/$1 [L]
Thank you, that was what I needed. After I outsmarted SELinux it worked fine.
/Fredric

> I expected to be able to tell Apache that "for this path run that php script" and not that the script had to be
> accessible via http and all that "handler" business.

You can use locationMatch or .htaccess files:
RewriteCond %{REQUEST_URI} !^(/js|/imgages)
RewriteRule ^(.*)$ /YOURSCRIPT.php/$1 [L]


begin:vcard
fn:Fredric Fredricson
n:Fredricson;Fredric
org:Ln4 Solutions AB
email;internet:Fredric.Fredricson@xxxxxxxxxxxxx
title:CTO
tel;home:+46 8 91 64 39
tel;cell:+46 70 677 58 48
version:2.1
end:vcard


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