Question

I have FRAPI framework installed on the windows server in the intranet under apache alias.

# Frontend
Alias /api "D:/var/www/api_dev/public" 

# Backend
Alias /api_admin "D:/var/www/api_dev/admin/public" 

The .htaccess file for admin part looks like this:

SetEnv APPLICATION_ENV development

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

The problem is that all actions, scripts and css are not rewritten.

All of them point to http://hostname/action instead of http://hostname/api_admin/action

Script and css are pointing to http://hostname/css/style.css and so on.

I added RewriteBase

RewriteBase /api_admin

But I had no luck.

How can I get everything in alias rewritten from http://hostname/ to http://hostname/api_admin/ ?

Était-ce utile?

La solution

I gave up and installed FRAPI under VirtualHost.

<VirtualHost *:666>
    ServerName hostname
    DocumentRoot D:/var/www/frapi/public
    ...
</VirtualHost>

<VirtualHost *:777>
    ServerName hostname
    DocumentRoot D:/var/www/frapi/admin/public
    ...
</VirtualHost>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top