I personally use codeigniter as my primary install around the primary domain. I've produced a subdomain along with a folder known as live e.g. live.domain.com maps to public/live . In public I personally use codeigniter.

I are in possession of the dynamic codeigniter url:

http://domain.com/api/

which I wish to map to my subdomain:

https://live.domain.com

So likely to:

https://live.domain.com/api/functioname

could be while using script:

http://domain.com/api/apifunctioname

and perhaps:

http://domain.com/api/apifunctioname/parameter1/parameter

Things are on a single server so no redirects are essential.

Anybody have applying for grants which rewrite rules to make use of?

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^live\.domain\.com [NC]
RewriteRule (.+)$ "http://domain.com/api/$1" [L]

The above mentioned is effective like a rewrite but redirects to http://domain.com/api/functionname rather I would like it to route to ensure that when likely to:

https://live.domain.com/api/functioname

It stays at this url but uses the script of

http://domain.com/api/functionname

Thanks greatly,

Ice

What about something similar to the next:


RewriteEngine On

RewriteCond % ^live.domain.com$ [NC]

RewriteRule (.+)$ "https://domain.com/api/$1" [L,P]

Just add index.php, see below

RewriteEngine On
RewriteCond %{HTTP_HOST} ^live\.domain\.com$ [NC]
RewriteRule (.+)$ "https://domain.com/index.php/api/$1" [L,P]