Questions tagged [url]

The tag has no usage guidance.

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

dynamic urls for channel/structure that's linked to the main structure

I'm trying to create dynamic urls for a channel or structure section that depend upon the url structure of a different structure (or the first entry in that structure). For example, if the main ...
1
vote
1answer
563 views

Get every slug from entry for each language

For the robot.txt file, I want to get every URI from the entries for every language. Right now it just gets the URI from one language. {% set crawledEntries = craft.entries({ relatedTo: { ...
3
votes
2answers
1k views

Catch-all routes based on template structure

I have many of the templates organized into sub-folders. E.g. /manager/entries/edit.html, /manager/users/edit.html etc. The site is using 4-segment URLs to access code in those templates, e.g. http://...
2
votes
1answer
723 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
347 views

Removing index.php strange issue

I already had this question posted but I didn't include enough relevant information so I deleted it and here I go again... I have a weird issue currently on my Craft setup. I have removed index.php ...
0
votes
2answers
137 views

index.php in output HTML - channel pages [duplicate]

is there are anything to do to delete index.php from output html? This is not very "clear"... In my case its channel array and I call {{entry.url}}... Any idea how could be this fixed / avoid? Big ...
1
vote
1answer
39 views

How to make a code/settings for accessing the one database from 2 different html files with {slug}

I create a code for TV show database, but I have a big problem. Please see the image I want to access one entry(post) with some data from some templates. But I don't know how to create any code or ...
1
vote
1answer
156 views

No template found when accessing action method per route

I want to render a (non-CP) template from an action method in my plugin controller over a route I defined in the plugin base class: function registerSiteRoutes() { return array( 'myservice' =&...
1
vote
1answer
222 views

multi-domain setup: template entry.url includes index.php

.htaccess is working fine. If I manually type url.com/about it shows the page. If I manually type url.com/asdf it shows 404 template page. url.com/index.php/testPathInfo shows success general.php ...
1
vote
2answers
606 views

How to set a URL for the top level of a Structure section?

I have entries in a structure section. I'd like the users to view the list of entries without the entries themselves being assigned URLs. How can I set a URL for the top level of a Structure section ...
2
votes
2answers
1k views

htaccess non-www rewrite showing index.php in URL

I am using htaccess to rewrite any www url to a non-www version RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] When I type domain.com/...
0
votes
1answer
1k views

How do I get a URL link to open in a new window once clicked [closed]

I have a URL to an external website within one my site's pages. I want this to open in a new window. I don't want the viewer to move off our website but will want them to click on the link to our ...
1
vote
1answer
105 views

Bulk upload images, generating a seperate page for each image

Building a photography website for a client, need a way to bulk upload images, much like using the assets field. I want these to be grouped into different sets by entry or category. So that I can ...
0
votes
1answer
282 views

Misconfiguration error when accessing URL without file name

When accessing www.myurl.com/services, I get this error below the content of my page: The server encountered an internal error or misconfiguration and was unable to complete your request. I don't ...
1
vote
1answer
107 views

404s on custom sections and entries

I have created a section called "Services" and an entry within called "seo". When I click to view that entry in the admin area, it takes me to domain.com/services/seo, as expected, but that 404s. Is ...
1
vote
1answer
338 views

Cannot omit index.php from URL

I know this question has come up many times before, although after reading and trying dozens of answers, I am none the wiser. I am currently rebuilding my website with Ubuntu 16.04, PHP7 and apache. ...
2
votes
1answer
207 views

How can I force a request type (HttpRequestService::isCpRequest vs. HttpRequestService::isSiteRequest)?

Is there a way to force a request type (HttpRequestService::isCpRequest vs. HttpRequestService::isSiteRequest)? In my case I'm generating some indexing data on entries.onSaveEntry. I'm trying to use ...
2
votes
1answer
256 views

Exclude certain entry types from Entry URL format?

I’m trying to find a way to ‘group’ pages in a structure, where that group page has no function other than to visually organise the entries in the structure, and does not need to be part of the url ...
0
votes
2answers
617 views

External URL with image

I want to have the option to have social media icons that will link to different URLs. I currently have it set up so the user can click which icons will display on the page, but how would I have it so ...
1
vote
1answer
373 views

What's the best way to build URLs for dynamic content collections?

I'm working on a project where we need to post publication Editions, each containing any number of Stories, of which there can be one of three entry types. The URL structure we're shooting for is foo....
1
vote
1answer
115 views

How can I set up a filter URL like example.com/category/foo/type/bar/country/usa

Given a category based set of entries/products, and a filter system based on tags, how would I accept (one of) the following urls and let one template process them all (not interested in the ...
4
votes
1answer
7k views

The requested URL was not found on this server

I've cloned an existing Craft site into MAMP Pro, set up my database in sequel pro and am able to access the site's homepage when I go to the URL I set up in MAMPS hosts. But whenever I click on a ...
2
votes
1answer
47 views

Translated pages load a white empty page on localised site

I'm running Craft CMS 2.6.2949 on PHP 7.0.10. I have set up 3 locales: nl_be, en and fr. I have set the following config into general.php '.dev' => array( // ... 'siteUrl' => ...
1
vote
2answers
1k views

URL drops :8888 from localhost

I'm running Craft CMS with MAMP at localhost:8888. When I pass in a URL with {{ entry.title }}, I get http://localhost/news/2016/we-just-installed-craft which gives me a 404 until I manually put in ...
2
votes
1answer
242 views

Partial match in URL getSegment()

Is there a way to partially match text in a URL segment? I would like to conditionally show code if the text "vascular" is in Segment 3. If my URL is: https://website.com/segment1/segment2/10009-...
2
votes
1answer
208 views

How to shorten 'craft.request.getUrl()' with the shortener plugin?

How can I use the shortener plugin to get and shorten the current URL? I've tried both twig and plugin methods shown in the docs, but the twig method outputs the FULL url, and the plugin method doesn'...
1
vote
2answers
615 views

I am unable to correctly return the url of an uploaded asset

I'm a newcomer to Craft from the far-off lands of WordPress. I hope my stay is long and fruitful, but at the moment that prospect is in danger. The problem I'm having must be embarrassingly simple, ...
1
vote
0answers
99 views

Where to find info on Entry URL Formats and routing syntax/options?

Is there any documentation other than on the CraftCMS web site with details and examples of Entry URL Format options/syntax? I came across an example from Brandon Kelly in this thread yesterday which ...
2
votes
2answers
735 views

Multiple URL Formats per element type (Entries, Categories)

I suspect this boils down to a feature request, but I'll start here in case there are any other ideas. Basically, I want to be able to define multiple URL formats for a single section or category ...
2
votes
1answer
444 views

Best solution for articles tag page?

I've been looking through the forum, it seems there's a few methods to retrieve a tags page but I'm looking for the most efficient method (both speed- and template-wise). Using tag.name with tag ...
1
vote
1answer
729 views

Asset URL's invalid

I have followed the points set out in the Craft Docs relating to environmentVariables, making sure to include '*' => array() before other config arrays. Here is my craft/config/general.php: return ...
1
vote
1answer
490 views

Correct Asset URL when using folders

My Craft blog has the path localhost:8888/blog The Assets are in the folder assets, so its localhost:8888/blog/assets. I set the path of an image to /assets, but then it looks for an image at ...
1
vote
0answers
121 views

Compose entry URL with hierarchy

I’m moving new project from Wordpress to Craft, which has the hierarchy in URLs. I’m try to compose URL for this new project: New category field have an option "Limit the number of selectable ...
2
votes
1answer
392 views

Adding .html to end of page url?

I am currently using Craft to manage only certain pages on a site. The static pages all end in .html but Craft's pages don't. Is there a way to rewrite them via Craft to add .html or do I have to do ...
1
vote
1answer
172 views

Omit index.php from URL on IIS

Is there a way to omit index.php from the URL when using IIS server? Adding 'omitScriptNameInUrls' => true, seems to break the site (except for the front page). index.php is removed from the ...
2
votes
1answer
2k views

Nginx: index.php URLs still being served alongside pretty URLs

For whatever reason https://domain.com/index.php?p=path/to/whatever and https://domain.com/index.php/to/whatever both still work and are not being redirected or rewritten to https://domain.com/path/to/...
1
vote
1answer
815 views

Pass a nested array to the params argument inside Craft's url() function

I have a list of checkboxes in a GET form which results in a URL with a querystring like ?q=&cat=&city%5B%5D=28&city%5B%5D=26&sort=asc&order=name when submitted. The Object/Array ...
1
vote
4answers
141 views

Translated URIs

I'm trying to change the URI of a single so on the german site it will show the translated URI. At the moment I'm just changing it here: However if I try to browse to /Über-uns on the german site I ...
2
votes
1answer
803 views

Including two category slugs in entries’ URLs

I have a section with two Categories fields, and I would like the entries’ URLs to include the slugs of the categories selected in each of those fields. The Category Groups are: mySection Employees ...
0
votes
1answer
143 views

index.php in url for just channel pages

I have followed the instructions for removing index.php and it works on all pages with the exception of pages with channels. So I would see http://www.example.com/index.php?p=news/2016/news-title. I ...
2
votes
2answers
1k views

Does it make sense to use Craft with relative links?

A coworker of mine asked me if I could make the links in Craft relative. Which is not a big deal for navigation links, relative url: {% set relativeUrl = entry.url|replace((siteUrl), '/') %} but ...
1
vote
1answer
474 views

How can I localize a URL in a plugin?

UrlHelper::getUrl() doesn't appear to take the current locale ID into account when generating a URL. Absolute URLs are fine as it handles that but is there a best practice way to localize relative ...
2
votes
1answer
459 views

Bilingual site page URL issues

I'm trying to setup a bilingual site and I'm having some issues with setting up the URI. 'siteUrl' => array( 'en' => 'http://localhost/mysite', 'fr' => 'http://localhost/mysite/fr',...
0
votes
1answer
130 views

Channel with URLs based on entry type

Example: I have content which could be separated into Big News and Small News. The Big News has much text (which would need a link to its own entry). The Small News has only one text block (so it ...
1
vote
1answer
246 views

Nest Entries from Different Sections

I have 2 separate sections living in the same place on my site. Example: About (Single-type Section) Team (Structure-type Section) So in the URL I need to nest Team underneath About, i.e. /about/...
1
vote
1answer
290 views

How can I create and validate against a url token?

I am (attempting) to and for the most part succeeding in sending an email from a plugin. My plugin has a textarea in the settings that allows the user to customize the message. The message looks ...
3
votes
1answer
445 views

Include related entry slug in URl

I've got a channel named "locations" that has an entry fieldtype which allows me to select the corresponding store/brand (limited to 1). How can I define the slug of the related entry in Entry URL ...
2
votes
1answer
931 views

How can I get an entry based on category and slug (via url segments)?

I am using (and have used) this S.O post to create a product filter/search using multiple categories. Everything is working perfectly. I am attempting to use the same type of logic to grab ultimately ...
2
votes
1answer
1k views

How to redirect with error messages?

If validation fails in plugin, how can I redirect it bank to previous URL with errors? craft()->urlManager->setRouteVariables(array( 'errors' => $errors )); gives 404 My Controller: ...
3
votes
1answer
425 views

Override a wildcard dynamic route template

I have a dynamic route for individual user /profiles. I expected it would be possible to override this route for /profiles/all but apparently not. This can be achieved in the template I expect, with ...