Questions tagged [uri]

A "Uniform Resource Idendifier" identifies a resource on a network.

319 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
255 views

Make variables outside of node available to pathauto

I'm trying to port a website over to Drupal 7. The structure consists of locations which have an entity reference to a region which has an entity reference to a country: location<-region<-...
4
votes
1answer
101 views

Routing to production and testing Drupal installations on shared hosting account

I am having issues with routing users to different domains on a shared hosting account. Each of these domains are separate Drupal installations with separate databases. site is intended to be the ...
3
votes
0answers
50 views

Register an object with the Service Container and give it a setRequest() (get base url)

I'm looking for a way to get the hostname of a multisite, and I've found several answers about it. One of the solutions was to use: Answer link $host= \Drupal::request()->getHost();   or \...
3
votes
2answers
622 views

hook_menu create a URL/Menu Item

I'm trying to create a page through hook_menu so I can add my custom block with context instead. function my_module_menu() { $items['my_page'] = array( 'title' => 'my_page', '...
3
votes
2answers
689 views

how to change the url based on region and language selection in drupal 7

I have five different regions and five different language. When loading my site url like domainname/regionname/langname .When user change the language or region url will be change selected region ...
3
votes
2answers
927 views

Views insert current page node id to image link url

I want to create a block view of some content's image field. I am trying to insert current page node id to paths of image links. Because linked page is a entity form and I try to prepopulate node id ...
3
votes
2answers
103 views

How can I create a “show full article” button that bypasses smart paging?

I am using smart paging currently but would like to create a button above my articles that would show the entire article on a single page (canonical link) that would also have no pagination (bypass ...
3
votes
1answer
301 views

Need to change the subdomain URL structure - D7

Need to change the subdomain URL structure from: sub1.example.com sub2.example.com To: www.example.com/sub1 www.example.com/sub2 Is there any module to do this in Drupal 7 If there is no other ...
3
votes
2answers
281 views

Search API path make SEO friendly

I am using Search API. I make a view of all the indexed entities and uses Taxonomy term as Contextual Filter. But the path of view is not SEO friendly. The path is like http://www.example.com/en/Real%...
2
votes
0answers
530 views

Keep randomly getting /index.php/ in link Urls with Pantheon (nginx)

I have a live D8 pantheon site and keep randomly getting index.php in the menu link urls. It's now happened four or five times. We've set a base url for the sitemap, so it has prevented the sitemap ...
2
votes
1answer
668 views

How do I modify the query parameters?

I want to modify query parameters used when accessing a Drupal page. I tried implementing hook_url_inbound_alter(), but it only allows to parse/modify the path, and it doesn't allow any interaction ...
2
votes
0answers
660 views

Prevent URL encoding of custom query parameters passed to FormState::setRedirectUrl()

Upon submission of a custom-coded form, I'm redirecting to a URL that includes query parameters. How can I prevent Drupal from URL-encoding those parameters? Example: $params = [ 'something' => ...
2
votes
2answers
750 views

Show custom banner per page

Admin user wants to be able to upload image banners and select on which pages/nodes/views/panels to show it when visited (as a wide screen image banner above title). It means when creating the banner ...
2
votes
0answers
414 views

node/123 is not redirecting to its alias

I have something going on in my site that I didn't notice until now. I am using the Domain Access module to create multiple sites within one Drupal instance, so I'm thinking that may have something to ...
2
votes
2answers
499 views

index.php is added in front of paths for anonymous users

I have a new Drupal 8.0.4 site running on Nginx, and I just noticed that the paths for anonymous users have a superfluous index.php in front of them. So instead of mysite.com/node/123 I get the ...
2
votes
1answer
653 views

How to keep URL parameters on subsequent pages after a form is submitted?

I'm sending a referral form out to my email database and I've got it set up so that their email addresses get passed through and appended to the form URL like this: http://www.holbrooktravel.com/...
2
votes
0answers
168 views

Relative URLs with S3FS module

So I found this answer on here on how to get relative URLs on my Drupal 7 site (How do I modify Drupal so that ONLY relative URLs are used through the whole site?), but it doesn't seem to work nicely ...
2
votes
1answer
62 views

How do I change the default front page?

How do I change the URL present under Home » Administration » Configuration » System in my Drupal site? I want to get rid of the stuff circled in red, but it only seems that I can add different pages ...
2
votes
0answers
47 views

Drupal images/links at the wrong URL(sometimes)

I have a Drupal website installed on cPanel. the site is at http://example.com Everything is working good, however at times, sometimes the images/links will be changed to a different URL then the ...
2
votes
1answer
450 views

Clean URL leads to duplicate URL after migration to another hosting

I have enabled clean URLs on the site after various article has been published on the site. But when I migrate from Bluehost VPS to Bluehost Share hosting, the clean URLs is not accessible again. And ...
2
votes
0answers
51 views

Sites module: get the unprefixed, global URL

Drupal beginner here. I'm working on a site which uses the Sites module to create location-specific URL's for all nodes. So say we have three locations: New York, London and Hong Kong. Plus Global of ...
2
votes
1answer
287 views

How to hide path location in drupal 7?

How to hide path file in drupal? Now it looks like this: http://localhost/drupal/sites/default/files/document.pdf I want to change to look something like this: http://localhost/drupal/media/view....
2
votes
1answer
2k views

Query URL containing term name instead of term ID on Views Exposed Filters

I've got a View with an Exposed Filter that shows Taxonomy Terms that are used to filter the content that's going to be displayed as the result. It's a View that shows recipes based on the filters ...
2
votes
1answer
121 views

Redirecting doesn't work with a custom form in a block

I developed a custom form with FAPI and added a block for it. Block is included only on one specific page (basic node). When user submits this form it should redirect user to external site (URL is a ...
2
votes
0answers
292 views

Remove default language from front page url

I have a drupal 7 site which was originally set up in English. The home page url would display www.mysite.com and other languages with /es /de /it after the url. After changing the default language ...
2
votes
0answers
316 views

How do I create custom URLs/paths?

I have been playing with the Services module for a couple of days. According to general REST API best practices, the GET URL paths I should use are: /buildings /buildings/4 /buildings/4/rooms /...
2
votes
1answer
39 views

Drupal theme IMG folder rewrite rule from vhosts conf file?

I am wondering if it is possible to create a rewrite rule in my vhosts config file for a site to remap the location of the images folder in the theme directory. The scenario is that I don't want to ...
2
votes
1answer
348 views

What's the correct way to enable clean urls when Drupal is hosted in a sub directory (linux server)?

Until recently, I've never used Drupal in a subfolder before, and having followed the directions in the .htaccess file as well as this page, I'm unable to get it working. Drupal projects will be ...
2
votes
0answers
94 views

subpath url alias does not seem to fire 404

I'm using subpath_alias, so /node/4/video alias is available too. But now, and I'm not sure subpath_alias is involved, /node/4/foo does not fire 404 and instead it shows the page as if it was /node/4. ...
2
votes
0answers
724 views

Contextual Filter from a select list (Key|value) - Use value rather than key

I have a Content type called Article, under which I have an article type field, which is a select list/dropdown field. The options of the field is as follows: 0Editorials|Editorial 2Feature|Feature ...
2
votes
1answer
256 views

URL redirect for changed url structure

I changed my Drupal 6 website tag structure and got a new URL however old URLs are indexed in Google and are generating 404 errors. My old URLs are www.mydomain.com/topics/12345/widget www.mydomain....
2
votes
0answers
975 views

Remove the language prefix from file URL

More specifically url's to files in the body text. So in my body text I have manually added <a href="/sites/default/files/some_file.pdf" />some file</a> to link to a file. I'm using the ...
2
votes
0answers
104 views

How to alter paths, that are translated by i18n?

I am using language selection by language domain in Drupal 7. That has the side effect, that all internal Drupal paths being created as absolute paths by the i18n module. To get sub-domains working ...
2
votes
1answer
759 views

Imagecache_external: Thumbnails of external URLs aren't accessible

Modules: Imagecache External, Media, Remote Stream Wrapper Scenario: I created a content type, in which I want to collect Movie Actors. My aim is to add images of those actors which arent hosted on ...
2
votes
1answer
261 views

Adding text to a field before save (Drupal 7)

I run into a situation where I need to wrap text inputted into a field before it is saved. I'm not sure the best way to do this, seems pretty straightforward but I'd like to find the "recommended way",...
2
votes
2answers
2k views

Generate one-time-use custom links for emails and interact with them to accomplish tasks

Is there a module that would auto-generate custom unique one-time-use URLs that timeout after a set time, and can be used to accomplish tasks and progress workflows in Drupal 7? Use Case 1 User ...
2
votes
2answers
127 views

How do I find a node knowing its URL?

I need to rename the node home-care/vids into home-care/product-solutions. The trouble is that I can't find home-care/vids in the dashboard of this relatively big site. How can I find it? I have ...
2
votes
0answers
257 views

Book module, taxonomies, url path settings, and breadcrumbs

I am a recent convert to Drupal from Joomla, and while I'm starting to get the hang of it, I just ran into a question that I need some expert advice on. I'd like to have online versions of a print ...
2
votes
1answer
121 views

Filter is Stripping URL with custom scheme

There are times we are using custom schemes for URLs and storing them in Drupal 6. The href attribute values are getting stored in the db properly. So, <a href="mycustomscheme://foo/bar"> ...
2
votes
0answers
356 views

How do I set up the active primary menu based on taxonomy?

I have set up a blog using a custom Article content type and a page View with a row style of fields. I have set up taxonomy terms to label my Article content types as I make them. In my View I have ...
2
votes
3answers
339 views

Views: List of recent months containing nodes

Using Drupal 7, views 7.x-3.0-beta3. I am trying to make a display containing a list of links which direct users to an archive page containing posts of that month (eg. all news messages posted in ...
2
votes
1answer
58 views

How can I have a node with the URL /themes

I've created a node and have given it the URL /themes. In full: http://site-name.com/themes. Permissions on the Drupal system folder 'themes' mean that the URL /themes gives: 403 forbidden. Is there ...
1
vote
1answer
977 views

How to create URL alias for node edit page

Pathauto can create URL alias for node view page, for example, URL from node/nid to project/nid (project is a name of content type), but the link to the edit page is not /project/nid/edit, but /node/...
1
vote
0answers
361 views

Get image url with https instead of http

When I use file_create_url it return url with http instead of https. Code Snippet: $desimg = file_create_url($node->field_image->entity->getFileUri()); Due to which i m getting warning ...
1
vote
1answer
489 views

Home Page rel=“canonical”

We created a home page as node/1850 which is specified in /admin/config/system/site-information. When I look at the generated code, I see: <link rel="canonical" href="/node/1850" /> This ...
1
vote
1answer
38 views

Pass id from URL to next page

I have made a product page overview that displays all the products of my webshop. On the left, I have placed a filter where people can filter the products (e.g. country can be France, Germany...). ...
1
vote
0answers
411 views

Front page identification and page--front template not working

After install URL Redirect module not able to check the current page is front page or not by programmatically. Following code does not return anything: \Drupal::service('path.matcher')->isFrontPage() ...
1
vote
1answer
70 views

Multilingual pages links showing node instead of URL alias

My web has 2 languages, English and Malay. The language selection is by session of ?lang=en or ?lang=ms. English is the default language and it is working fine. All internal links are using the ...
1
vote
2answers
323 views

Get web image url from real path

As part of some other functionality I am generating an image in temp folder and But unforunately I'm not able get the web url of image. $path = \Drupal::service('file_system')->realpath(...
1
vote
0answers
899 views

facebook change default og:url and canonical URL with metatags module

I moved my site from HTTP to HTTPS, now a few days later my facebook likes are waaay lower. For example one article under HTTP was 25K likes now under HTTPS it is 3K likes. I am face with the facebook ...

1
2 3 4 5
7