Getting Internal 500 error when using RewriteBase with laravel app


  • | 299 points

    So I'll preface this and say that this same configuration works just fine on Valet (mac) as well as artisan serve (same computer running Laragon)

    So the issue is that when using RewriteBase /somealias in the projects .htaccess file, i get the following error...

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator at admin@example.com to inform them of the time this error occurred, and the actions you performed just before this error.

    More information about this error may be available in the server error log.

    If i change it to RewriteBase / or just remove it all together the laravel app loads up.

    Wasn't sure if there is a configuration change i could make to fix this or if it's a bug. Either way i would love to ditch my current workflow on my windows machine and start using Laragon but unfortunately this is a show stopper for me atm.

    Any help would be greatly appreciated. Thanks

    EDIT: Running Windows 10 with Laragon 2.1.5


  • administrators
    | 56271 points

    @whereisjefe: I don't know what you tried to achieve with RewriteBase /somealias but I'm sure that it is a misconfiguration.
    Your .htaccess works with Valet because Valet doesn't care about your .htacess as it using Caddy and now Nginx.

    So, I wonder why you don't use Laragon with Nginx?

    If you still want to go with Apache, you can open error.log to see why (Menu > Apache > error.log).
    From there, you may find out the clue and sort it out (Google is your friend :) )


  • | 299 points

    @leokhoa ahhhh, that makes perfect sense.

    I went ahead and removed the apache version and with Nginx, works perfectly now. Thanks for the quick response and amazing tool.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.