skip to Main Content

How can i completely disable pretty URL feature of Laragon, so for example right now by default in Laragon pretty URL is set as {name}.test where {name} is root folder and test is any string of our choice.
so in Laragon i access my wordpress admin (root folder demo ) as:
http://demo.test/wp-admin/
but i want to access it as:
http://localhost/demo/wp-admin/

2

Answers


  1. You can always access the page or web app with http://localhost URL.

    If you don’t want to use the "pretty url" (a.k.a. virtual host feature), you can turn it of in installer or in Laragon settings.

    Images from https://laragon.org/docs/install.html :
    enter image description here
    enter image description here

    Laragon doesn’t remove existing virtual host configuration when you turn off "Auto virtual hosts" in configuration.

    To remove the virtual host, you have to remove it from the etc/hosts file of your OS. You can use "Edit etc/hosts" from the Laragon’s Menu. Remove the lines with #laragon magic! comment. Deleting a project using the Laragon’s Menu removes the line from hosts too.

    enter image description here

    To fully cleanup the virtual server configuration, remove server_name from auto.{project}.test.conf

    Login or Signup to reply.
  2. What you describe is called base_url in wordpress it’s called siteurl in the config.

    Than just create an apache config like

    <virtualhost *:80>
        servername localhost
    
        DocumentRoot /var/www/
        <Directory /var/www>
            AllowOverride All
            require all granted
        </Directory>
    </Virtualhost>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search