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
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 :
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.To fully cleanup the virtual server configuration, remove
server_name
from auto.{project}.test.confWhat you describe is called
base_url
in wordpress it’s calledsiteurl
in the config.Than just create an apache config like