Using URL Rewrite on IIS for website with sub applications
I'm trying to use Laravel to host an API. On my test server it work, I
have one website and the project sits directly under it. With this my URL
Rewrite is
<rule name="Laravel Rewrite" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}"
matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile"
negate="true" />
</conditions>
<action type="Rewrite" url="public/index.php" />
</rule>
This rule does not work on my production server because the website
hosting the API is also hosting two other websites. Let's say the
hierarchy is
/Website
-Web1
-Web2
-api
The goal here is to direct to Website.com/api/Login for example. But I am
not able to create a rule that will rewrite to /api/public/index.php. I
really want to kick the /public/ portion out of the URL.
How would I construct such a rule ?
No comments:
Post a Comment