0

Develop a project in laravel and upload it to a server with IIS and when I try to use the paths that I defined I get error 400, but not the error 400 of laravel if no other, searching the internet I discovered that it is because of a problem with the configuration , missing this line of code

AllowOverride All

Normally this line is included when creating a virtual server on my pc, but in ISS I do not know how to solve it

http://186.24.32.115/web-spi/public - if I enter this url I load the web page well, but if I use the menu, I will leave error 400.

But if I do it this way http://186.24.32.115/web-spi/public/index.php I have no problem.

How do I make my routes work without using the index.php?

Edwin Aquino
  • 201
  • 2
  • 16
  • Which IIS Version are you using on which Server-Version? – errorinpersona Oct 25 '18 at 17:10
  • Windows Server 2012 R2 - IIS 8 – Edwin Aquino Oct 25 '18 at 17:13
  • Maybe this: https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/importing-apache-modrewrite-rules or this: https://stackoverflow.com/questions/15018538/laravel-htaccess-rewrite-rule-conversion-to-iis will help you? – errorinpersona Oct 25 '18 at 17:19
  • Make sure the `Physical Path` setting for your website in IIS Manager ends with the `public/` folder of your application, otherwise the default rewrite rules included for [web.config](https://github.com/laravel/laravel/blob/master/public/web.config) might not work properly for rewriting requests to the index.php file – Travis Britz Oct 25 '18 at 17:32
  • @TravisBritz In which part of the administrator can I verify this? – Edwin Aquino Oct 25 '18 at 17:36
  • @EdwinAquino do you have access to the IIS Manager program for your host? Under `Sites > {your site}` you should be able to see a "Basic Settings..." option in the right side panel's "Actions" section. There are other ways to find this setting as well, but you're looking for the `Physical Path` option that tells IIS which folder is the public document root of your website. If your Laravel project is in the `web-spi/` folder, then your `Physical Path` needs to end with ...`web-spi/public/`. – Travis Britz Oct 25 '18 at 17:42
  • I made the change of the route and I left it to be in the public and for now it works, thanks – Edwin Aquino Oct 25 '18 at 17:55

0 Answers0