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/

- 338
- 1
- 10
- 19
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.conf

- 3,490
- 4
- 18
- 25
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>

- 1,766
- 11
- 24
-
Mind ellaborating on your answer? how? where? – ggonmar May 29 '23 at 17:40