Laragon Apache - htaccess is being ignored


  • | 84 points

    I've already edited the httpd.conf. Mod_rewrite is enabled.

    LoadModule rewrite_module modules/mod_rewrite.so

    DocumentRoot "C:/Users/mda/Desktop/Work/example.com"
    <Directory "C:/Users/mda/Desktop/Work/example.com">
    Options All
    AllowOverride All
    order allow,deny
    allow from all
    </Directory>

    Have a .htaccess file in document root. No matter what i change it to, nothing happens How do i solve?


  • administrators
    | 123015 points

    @md458 : You should use Apache 2.4 settings:
    https://httpd.apache.org/docs/2.4/upgrading.html


  • | 331 points

    @leokhoa
    from what I gather in link is one should use AllowOverride All in order to allow .htaccess being processed, which I have in my .conf file. But it still gets ignored....


  • | 101 points

    I encountered similar issue when i initially moved to Laragon. The fix is actually simple.

    Laragon is compiled with its httpd.conf set to reject overwrite on the document root.
    To edit this, check the file on
    {LARAGON_ROOT}/bin/apache/httpd{other-version-details}/conf/httpd.conf
    and the file somewhere around line 251 to 278 change AllowOverride to All and restart your Laragon Server.

    That fixes it


  • | 36 points

    Hi,

    I'm also still stuck with this problem as none of the following solutions seem to work.
    Does anyone has any idea how to make it working? :/


  • | 331 points

    @SamPLe12
    I was stuck with this as well.
    What I did was to create a new laravel project using laragon. That fresh site worked without a problem from the start. The difference was the .htaccess file itself, slightly different when compaired to the one on my project (which started as a laravel 5.4 project ). Now it's laravel 5.8 but I guess I never upgraded its .htaccess file.

    What were those differences, no clue. All I can say with the new one it worked perfectly.:blush:

    If you try this, just be careful with if run a different version of Apache on production servers and properly test the new .htaccess file.

    I know, this kinda sounds like "reboot your computer and try again" ( hoping for the best). But hey, it worked for me. :grin:


  • | 249 points

    @youngmayor32
    This worked for me. Thanks. You just saved me.


  • | 34 points


Log in to reply
 

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