<p>You need to edit the <strong>Entry URL Format</strong> under <code>Settings &gt; Sections &gt; [choose section]</code>. If you want your URLs to mirror the Structure's hierarchy then set it to something like <code>{parent.uri}/{slug}</code>.</p>
<p><strong>However!</strong> It looks to me like you're falling into the trap of mirroring the current design/layout of your front end site into your content model. I've inherited lots of sites built like this and they become practically impossible to <a href="https://alistapart.com/article/redesignrealign/" rel="nofollow noreferrer">redesign/realign</a>, instead requiring full rebuilds, and they're just horrible to work with once the content model grows.</p>
<p>Instead, consider creating a separate section called &quot;Locations&quot; where each entry represents a single location, and then use relationships to tie everything together.</p>
<p>More comprehensive rant about arbitrary hierarchical abuse available at <a href="https://cld.agency/blog/content-utopia" rel="nofollow noreferrer">https://cld.agency/blog/content-utopia</a>!</p>
<p>In short, I'd argue that semantically/taxonomically speaking, a child item in a hierarchy should always be a more specific type of its parent, but still the same &quot;thing&quot;. &quot;Austin TX&quot; is not the same &quot;thing&quot; as the &quot;Locations&quot; entry, nor the &quot;About&quot; entry. I would imagine that the former should be a listing page showing all locations, while the latter should be a generic information page that gathers together whichever content the editor chooses.</p>

CC BY-SA 4.0
2023-05-05T15:26:41.963Z
2023-05-05T15:32:39.060Z
2023-05-05T15:32:39.060Z
James Smith
<p>I've looked everywhere and can't find a solution to my issue. I'm in the process of setting up a local Craft 3 site and have a question regarding the URL setup. When I originally installed Craft I did a manual install (downloaded Craft 3 from the Craft site) and used terminal and MAMP and used the manual MAMP default ports (which was the direction in the video tutorial I watched). I did not install using Composer for I was having issues. I'm on a Mac.</p>
<p>I edited my .env file to the settings below after creating my database in phpMyAdmin to the settings I entered:</p>
<pre><code># Database Configuration
DB_DRIVER=mysql
DB_SERVER=127.0.0.1
DB_PORT=8889
DB_DATABASE=craftdatabase
DB_USER=craftuser
DB_PASSWORD=Sundancer290
DB_SCHEMA=
DB_TABLE_PREFIX=

# The URI segment that tells Craft to load the control panel
CP_TRIGGER=admin

PRIMARY_SITE_URL=http://localhost:8888/
</code></pre>
<p>My base URL setting in Craft under settings/sites is $PRIMARY_SITE_URL.</p>
<p>When I click the visit webpage icon inside entries I get the following in the URL:
http://localhost:8888/http:/localhost:8888/http:/localhost:8888/about/locations/austin-tx</p>
<p>How can I change this to <a href="https://craftsite.test/about/locations/austin-tx" rel="nofollow noreferrer">https://craftsite.test/about/locations/austin-tx</a> like a normal URL? Where would I go to change these settings? MAMP and my .env file? I'm at a loss trying to figure this out for a few days now.</p>
<p>Thanks for any help!</p>
<p><a href="https://i.sstatic.net/PcfXF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/PcfXF.png" alt="enter image description here" /></a></p>

<database><url><mamp>
How can I change the local host url from http://localhost:8888 to something custom
# How can I change the local host url from http://localhost:8888 to something custom

(Asked by: username_0 on 2023-05-03)

I've looked everywhere and can't find a solution to my issue. I'm in the process of setting up a local Craft 3 site and have a question regarding the URL setup. When I originally installed Craft I did a manual install (downloaded Craft 3 from the Craft site) and used terminal and MAMP and used the manual MAMP default ports (which was the direction in the video tutorial I watched). I did not install using Composer for I was having issues. I'm on a Mac.
I edited my .env file to the settings below after creating my database in phpMyAdmin to the settings I entered:
# Database Configuration
DB_DRIVER=mysql
DB_SERVER=127.0.0.1
DB_PORT=8889
DB_DATABASE=craftdatabase
DB_USER=craftuser
DB_PASSWORD=Sundancer290
DB_SCHEMA=
DB_TABLE_PREFIX=

# The URI segment that tells Craft to load the control panel
CP_TRIGGER=admin

PRIMARY_SITE_URL=http://localhost:8888/

My base URL setting in Craft under settings/sites is $PRIMARY_SITE_URL.
When I click the visit webpage icon inside entries I get the following in the URL:
http://localhost:8888/http:/localhost:8888/http:/localhost:8888/about/locations/austin-tx
How can I change this to https://craftsite.test/about/locations/austin-tx like a normal URL? Where would I go to change these settings? MAMP and my .env file? I'm at a loss trying to figure this out for a few days now.
Thanks for any help!

**Tags:** database, url, mamp


---

## 1 answers

### Answer by username_1 on 2023-05-05. Score: 2

You need to edit the **Entry URL Format** under `Settings > Sections > [choose section]`. If you want your URLs to mirror the Structure's hierarchy then set it to something like `{parent.uri}/{slug}`.

**However!** It looks to me like you're falling into the trap of mirroring the current design/layout of your front end site into your content model. I've inherited lots of sites built like this and they become practically impossible to [redesign/realign](https://alistapart.com/article/redesignrealign/), instead requiring full rebuilds, and they're just horrible to work with once the content model grows.

Instead, consider creating a separate section called "Locations" where each entry represents a single location, and then use relationships to tie everything together.

More comprehensive rant about arbitrary hierarchical abuse available at <https://cld.agency/blog/content-utopia>!

In short, I'd argue that semantically/taxonomically speaking, a child item in a hierarchy should always be a more specific type of its parent, but still the same "thing". "Austin TX" is not the same "thing" as the "Locations" entry, nor the "About" entry. I would imagine that the former should be a listing page showing all locations, while the latter should be a generic information page that gathers together whichever content the editor chooses.


---

