Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [siteurl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
51 views

{{siteUrl}} not working on load

I am using {{ siteUrl }} for absolute links. It works 95% of the time. But if I press the reload button multiple times in a few seconds (overloading or something) my links look like this: href="$...
1
vote
0answers
18 views

Override the language-part in URL and add a region (en-fr / fr-fr)

I ran into a problem one year ago, but our we changed the specifications and so it was not neccessary anymore(another question here commented). One year later now, the issue is back, harder as before ...
2
votes
1answer
82 views

Use alias for site url based on root url defined as env var?

I was wondering if the following setup is a good practice. In my .env file I defined a single rootUrl var which contains the site root url like this: ROOT_URL="https://www.mydomain.test" In the ...
1
vote
1answer
263 views

Invalid path alias

I'm not sure if I understand the alias concept entirely So I want to create an alias. I write a variable into my .env File: SITE_URL_DE="http://hello.local" Then I put it into my general.php File:...
1
vote
1answer
70 views

Moving site to subdomain

I am moving our current site to a subdomain and get this: "Craft CMS requires the PHP multibyte string extension in order to run." I have updated the $craftPath variable and System->General->...
1
vote
1answer
47 views

The Variable {{ siteUrl }} Produces Two /es/es/ On Multisite

I'm getting example.com/es/es for my Spanish site instead of the expected example.com/es when using the {{ siteUrl }} variable. The primary site is producing the expected example.com/ Any idea of ...
1
vote
2answers
3k views

How do I get the primary site URL?

Is there an available variable for the primary site URL in a multi-site CraftCMS setup? I need a variable that I can attach to my logo that will take the user back to the primary site. I could hard ...
2
votes
1answer
570 views

What is the difference between siteUrl and baseUrl?

What is the difference between siteUrl and baseUrl in Craft 3? Is there any?
1
vote
1answer
122 views

How to make URLs translatable in Craft 3

I am trying to make the URLs translatable according to the language selected for the site.
1
vote
0answers
29 views

_entry.twig in sub folder, rich text editor images using relative URL and are therefore not found

This may be something obvious that I'm missing, but how can I make craft use absolute URLs for images add to rich text editor fields? Or use the {{siteUrl}} prior to the image src URL in order to fix ...
0
votes
1answer
608 views

Dynamic Entry URI's for pages

This is probably very straight forward but unfortunately I can't seem to solve it. We want to create a dynamic URI structure that allows us to easily create pages and link them with parent ...
1
vote
1answer
30 views

Customise the URL for an asset

I need to prepend a URL to the beginning of an asset URL in order to track stats for a podcast via Blubrry. What are the options? Specifically I need to drop the https that would appear in my URL by ...
2
votes
1answer
2k views

If page conditions

I have an {% include%} which displays entries from a structure. This {% include%} is displayed on the homepage and other entries throughout the site. On the homepage, I'd like the include to show a ...
0
votes
2answers
40 views

Strange 'index.php' Issue

I have built and deployed dozens of Craft sites, so I know how to remove 'index.php' from urls, but now I have a site that refuses to accept my most determined efforts to remove it. This is the ...
1
vote
1answer
861 views

Craft asset urls not working

I have checked all other questions on stack exchange with similar titles and they don't seem to help my situation. I have added assets sources to craft CMS. but when uploading I get the following ...
1
vote
1answer
220 views

How do I set my siteURL instead of having http://localhost:8888/?

I downloaded and installed Craft Personal on my computer and choose /websitetest/ as my website name. I used MAMP and phpMyAdmin to create a database. Still to access my website the url is http://...
3
votes
3answers
3k views

Setting the Homepage URL in Craft 3

This seems like an odd question, but I've looked through the documentation, Slack, and the StackExchange and it's weird that I'm not seeing anything... so I feel like I'm overcomplicating it. How do ...
2
votes
1answer
540 views

Problem with Site Running Both HTTP & HTTPs

So we're trying to set-up a site to run both HTTP & HTTPs version in parallel for SEO auditing before making the full switch to HTTPs. We followed Ben's answer on this SE question to make it work: ...
0
votes
1answer
32 views

Not seeing the entries in control panel

We recently moved the site from one domain to another domain (development to staging). I am able to login to control panel and see the fields and sections but when I go to entries, i dont see any ...
2
votes
2answers
369 views

Localhost: Why does {{ asset.url }} return {{siteUrl}}/path in the browser?

I'm very new at Craft templating, and I can't seem to get an asset to link correctly in the browser. {% block content %} <article> <h1>{{ entry.title }}</h1> {{ ...
2
votes
1answer
128 views

siteUrl in Twig templates not working

I've got a problem where siteURL wasn't working for a localized version of my site. I have a site in two languages — Russian and English, with Russian exposed under www.mysite.com and English under ...
8
votes
3answers
7k views

How to output the full page URL?

Very simple request! All I want to do is to be able to get the full URL of the page & output that in the HTML (for a 'share this page' link). Can anyone help please? Many thanks!
1
vote
1answer
442 views

Get full file url, avoiding the siteUrl trailing slash

so I'm using an asset field for an OG Image. I need to get the full url for this and I've yet to find a clean way to do this. I figured I could just combine siteUrl and the asset url but I have a ...
1
vote
2answers
125 views

siteUrl config and Control Panel conflict

I have set up environments in my config file and included a different siteUrl for each. This is so I can change the navigation on the fly. I have noticed however that siteUrl when defined in the CP ...
0
votes
1answer
279 views

siteUrl not updating

Experiencing a headache on a client site where the siteUrl declared in general.php is not being reflected in the Control Panel (which is always showing the local siteUrl) and therefore also the ...
2
votes
1answer
272 views

Slow Site Speed and Increasing Memory

We are experiencing incredibly slow site performance. Any tips on where to find out how much memory the site is using, or if increasing this will increase internal site loading and navigating speed? ...
1
vote
0answers
40 views

Wrong siteUrl chosen in multi-environment config [duplicate]

I have following setup for my site urls (after other testing domains): return [ '*' => [ 'omitScriptNameInUrls' => true, 'usePathInfo' => true, '...
5
votes
2answers
941 views

Get the Category name into the URL for an entry

I have a gallery which is categorised. The gallery is a Structure section where the user adds an entry and then assigns it to a category - all good. At the moment, when clicking on an entry title the ...
0
votes
1answer
38 views

Outputting siteUrl consumes next closing tag

I'm running Craft Pro 2.3.2640. Here is the code: <span>{{ siteUrl }}</span> Here is the output: //localhost:3001/%3C/span%3E The opening tag stays intact. I am also struggling to ...
1
vote
1answer
1k views

Adding XML Sitemaps

I've attempted to add an xml sitemap within the /public directory but received a 404 because htaccess is blocking the document. What is the proper location and method to add an xml sitemap to Craft?
3
votes
1answer
777 views

How do I make the “%20” in URL's show as “-”

I'm building a site where I am linking entries based on their tags. If you click on a tag you go to a dedicated page with all entries that share the same tag. {% for tag in craft.tags.relatedTo(entry)...
2
votes
3answers
351 views

Making a dynamic {{ siteUrl }} for local mobile testing

I'm developing a site using a mobile first approach, connecting the phone via USB and using Safari's Web Inspector on iOS8. On my local machine, the url for all CSS, JS and href links is http://...
11
votes
3answers
2k views

How to set up {siteUrl} to work with both http and https

I'm looking for a way to set up the general.php file's siteUrl to be able to use both http and https. Only the front-end login would be using the https. This is how I currently have it set up: '...
0
votes
1answer
1k views

Craft\EntryModel and its behaviors do not have a method or closure named “siteUrl”

Getting the above error when trying to add a new entry to a structure section. The Section has an Entry URL Format of: {siteUrl}/{slug} In my general.php in the config folder I have: return array( ...
7
votes
3answers
2k views

URL rewrite not working

For some reason the CraftCMS URL rewrite is not working on GoDaddy shared hosting server. Currently by .htaccess file looks like this Options +FollowSymLinks -Multiviews <IfModule mod_rewrite.c&...
2
votes
2answers
1k views

Environment specific siteUrl settings not working

I followed the advice from this and this post, but I just can't get my environment specific siteUrls to work. This is what my config file looks like: return array( '*' => array( '...
4
votes
1answer
1k views

How to grab the full URL in a plugin?

When writing a plugin is there a Craft request to grab the entire url? I want to grab everything including http://domain.com/uri preferably without writing my own function. I see getUrl but craft()-&...
3
votes
1answer
771 views

multi-environment config for {siteURL} not working

I've got a multi-environment setup working well for my database - that was easy to setup and i've had no issues getting it to work. Now i'm trying to set the siteUrl as a multi-config variable and no ...
3
votes
1answer
607 views

Environment Variable siteURL ignored

In my general.php file I have a siteUrl environment variable declared: 'ontherocks.dev' => array( 'devMode' => true, 'environmentVariables' => array( 'siteUrl' => 'http://...
5
votes
2answers
5k views

What's the difference between {{ siteUrl }} and url()?

Both of these things: 1. {{ siteUrl }}path/to/template 2. url('path/to/template') ... will generate this: http://mywebsite.com/path/to/template So I'm wondering, which method is preferred? Are ...