Add the admin/.htaccess
rewrite rules to your server config file.
All the requests sent to the admin
folder are redirected to admin/index.php
, which creates the main routes.
This is done with admin/.htaccess
on apache servers.
Here's how to make the same redirections on NGINX or Microsoft IIS servers.
location /admin/ {
try_files $uri /admin/index.php;
}
If you instal PHPCG in a subfolder, of course add your subfolder before /admin
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^admin/(.*)$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="admin/index.php/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>