Questions tagged [url]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
24
votes
4answers
7k views

Add home page to a structure?

I am using a structure for all of my site's pages (single pages and channel index pages). The structure settings are as follows: URL for Top-Level Entries: {slug} URL for Nested Entries: {parent.uri}...
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: '...
13
votes
5answers
6k views

Image transforms returning cpresources url

I'm trying to get Craft to render an image transform defined in the control panel. No image is added to the "filelocation/_transformhandle" folder and returns the url "/cpresources/transforms/98" ...
32
votes
1answer
9k views

What’s the recommended way to set the site URL?

There are multiple ways to set the site URL. What is the recommended way?
8
votes
1answer
2k views

How do I add a subcategory to the URL slug for a channel entry?

I'm trying to mimic the URL structure exactly how I have it in my old CMS. If I select an entry to have both a category and subcategory I would like to have the subcategory in the URL along with the ...
2
votes
1answer
828 views

Another index.php?p= problem

I can't get rid of that pesky index.php?p= from my urls. http://mysite.com/index.php?p=about/people If I manually remove index.php?p= e.g. http://mysite.com/about/people it works, but then goes back ...
9
votes
2answers
4k views

How would I include the first category slug in the section's entry URL format?

I have a custom section that uses routes like this: /section/category/entry_url In trying to program the search form results I realized that I need to explicitly define the entry URL format for the ...
4
votes
2answers
3k views

CSS is not loading on staging server

I'm quite new to server config, so this might be a simple mistake. I have a local environment setup on my computer that works just fine. I uploaded my project to my staging server at AWS and the only ...
4
votes
1answer
2k views

Installing Craft in sub directory

I need to install Craft under a laravel sub-directory http://example.com/corp/ where example.com is a laravel site. Does anyone have a clean way to install craft in a directory below an existing app?...
2
votes
1answer
2k views

URL rewrites not working return Apache 404's

Content is accessible via example.com/index.php?p=page-name but not via example.com/index.php/page-name or example.com/page-name. The .htaccess and 'omitScriptNameInUrls' => true are both in place ...
17
votes
4answers
12k views

301 Redirects Appends ?p=original/url/path - how can I remove?

Whether I'm using the Reroute plugin or plugging it in .htaccess, changing the path elsewhere appends the query in the end. How can I remove? Redirect 301 /blog/category /blog/archive Is the line I ...
9
votes
3answers
3k views

Entry Types Custom Slug

The website I'm working on has different sections and each section different types of entries. I would like the types of entries to be shown in the URL. I have followed this tutorial to do so. In a ...
3
votes
2answers
670 views

Is there a better way to localise channel url?

I'm working on a bilingual site (en and cy) and have a news channel with entry urls news/{slug} and the translated cy/newyddion/{slug}. Everything is working well with entries and if the url is ...
6
votes
1answer
2k views

Dynamically setting a channel's Entry URL Format with Craft tags

I have a Structure section and a Channel section. Entries in the Channel will be listed on one of the Structure Entries, and it's entry page will fit the same URL format. So for example, the ...
5
votes
1answer
919 views

Output URL to section

Is it possible to output the path to a given section? I'm using this to define the section model for the contact page (a single): {% set contactPage = craft.entries.section('contact') %} But then, ...
4
votes
1answer
585 views

Best practice on how to hand over variables with links?

You sometime want to pass specific info from one page to another. How do you do that with twig and are there explicit Craft methods to do this? Can you do this without exposing the variable in the ...
3
votes
1answer
3k views

URL Format of a nested structure with 3 or more layers

I have a nested Structure with 3 layers like so: Home Services Service A Sub Service A Sub Service B Service B About Us Contact Now I would like the nesting to be reflected in the URL like so: ...
2
votes
2answers
1k views

What's the best way to link to an entry in a template?

I have the following code and I'm looking for the best way to link to another entry page. <a href="#" class="btn-quote">request a quote</a> I tried something like this with no luck: <...
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: ...
2
votes
1answer
1k views

omitScriptNameInUrls is not working

I think I've just about hit my wits end here. I'm trying to get set up on a new Rackspace server and I can't seem to get my URL rewriting to work properly. Here's what I got so far: My Craft install ...
1
vote
1answer
249 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 ...
7
votes
1answer
871 views

Using an IF-statement to define the Entry URL Format

Within a channel I have two kinds of possible article types, which I separate with the entry type feature. For the entry URL format I want to include the type, but only for one of the two. I've tried ...
7
votes
3answers
3k 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&...
4
votes
2answers
597 views

Can I use translated properties for URL formats

Here's my scenario. I have a structure section: "events". Within that I have three entry types: "events", "exhibitions", "specials". I would like the events to follow the following URL structure: {...
3
votes
1answer
799 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
2k views

How do I make site links relative?

To get around a temporary issue where two urls go to the same site, I wanted to set all my site links to be relative rather than using the full url. Looking through the Craft docs I found that it's ...
2
votes
1answer
513 views

Invalid verification code. Please login or reset your password

I am sending the set Password URL to a user to set their password after ADMIN create a user in CP. I am using craft()->users->getPasswordResetUrl($user) to generate the URL for set password ...
2
votes
2answers
6k views

Force trailing slash on URLs

This is an .htaccess question which I found the answer to but, I need to integrate it with the .htaccess that comes with Craft. I need to add trailing slashes to the end of all URLs. I know there is ...
1
vote
1answer
233 views

Get the category into the url of the product page

I'm in the middle of learning Craft Commerce. When I go to an individual product my URL says /shop/wella-shampoo/. I'd like it to say /shop/**hair-care**/wella-shampoo/ because this is the category ...
1
vote
1answer
613 views

Nested categories in URL slug

I'm new to Craft and exploring whether it's worth my team moving our existing, deeply-structured content site onto Craft CMS. We have a heavily nested sitemap at the moment with 6 top-level ...
1
vote
2answers
495 views

How can I use the entry UID in the entry URI

The entries in my Craft app need a unique ‘non-guessable’ URL, so I figured I could use the UID in the URI of the entry. So in the section, where I need to provide the URI format I entered "section-...