Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [siteurl]

The tag has no usage guidance.

-1
votes
0answers
23 views

New URL, same Server - How can I connect it?

After a long time of developing, tomorrow is the day and I should connect the system with the new URL. I'm trying it the all day with an other domain for tomorrow but I don't get it work. I think I ...
1
vote
1answer
29 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
32 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
520 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 ...
0
votes
0answers
67 views

How to create a global nav for multiple sites? (Craft 3)

I'm trying to make a global navigation that will display on all my sites that contains navigation for my primary site. I have my nav items in a structure and am using unique templates for each entry ...
2
votes
1answer
358 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
59 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
25 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
441 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
26 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 ...
0
votes
0answers
72 views

URLs on subpages wrong

I am running Craft 3 beta. Now I am witnessing an issue I never had with Craft 2. On every subpage (mywebsite.dev/subpage) I have wrong URLs whenever I try to use relative URLs. For example an image (...
2
votes
1answer
999 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
37 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
601 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
137 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
2k 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 ...
3
votes
1answer
446 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
24 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
350 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> {{ ...
3
votes
1answer
114 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 ...
0
votes
0answers
50 views

Duplicate urls for zh_cn locale

I have an environment out of three that seems to be duplicating the url on every page for a specific locale. http://stage.website.cn/stage.website.cn/ This occurs within the cms and on the rendered ...
5
votes
2answers
4k 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
385 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
106 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
226 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
263 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
37 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
738 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
37 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
997 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
654 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
331 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
1k 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
735 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
540 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 ...