noob question: nginx rewrites wordpress


  • | 172 points

    Hi, I have a bunch of projects that i was using IIS with, but now I want to use the NGINX setup with laragon instead, however I was using a localhost/{projectname}/ setup.

    So for pretty links I read that its better to use laragons virtualhosts system, but I dont want to replace all the wordpress mysql tables with the new urls..

    so can I just use rewrites in nginx config?

    can't seem to get it working...

    basically need to change
    localhost/{projectname}/
    to
    /{projectname}.test

    I tried adding to the nginx '00-default.conf' file:

    location / {
    rewrite ^(https?)://localhost/(.*?)/$ $1://$2.test/ permanent;
    }

    but it just won't work!!

    help appreciated

    cheers

    Ben


  • administrators
    | 112691 points

    @bendy303 :
    The easiest way is updating VirtualHost.tpl in usr\tpl dir.


Log in to reply
 

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