0

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/

Tarun Mahashwari
  • 338
  • 1
  • 10
  • 19

2 Answers2

-2

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

Juraj
  • 3,490
  • 4
  • 18
  • 25
-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>
on8tom
  • 1,766
  • 11
  • 24