Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A "Uniform Resource Idendifier" identifies a resource on a network.
5
votes
How do I use Url::setUnrouted() in a custom module?
It is used by the static constructor Url::fromUri() when the URI passed as argument isn't a route. …
0
votes
Accepted
Why NOT to use Clean URLs?
My unconfirmed hypothesis is that this setting was still available through Drupal 7, even on servers that properly support rewrites, was to provide backward compatibility.
There are scenarios where y …
3
votes
Accepted
How to force Views (or whole Drupal) to lowercase page paths?
This is untested, but I believe you can use a hook_url_outbound_alter() for this, since I think Views URLs still get run through url() when they get generated:
function MYMODULE_url_outbound_alter(&$ …
0
votes
Views insert current page node id to image link url
If you have a Contextual Filter in place for Content: Nid that is pulling in the nid from the currently viewed page, can
Add a field for your image
Choose Image for the formatter. Configure the ima …
40
votes
Accepted
how to get the absolute path for files based on fid
Drupal 7
This is a two part process, using file_load() and file_create_url()
First, you need to turn the $fid into a Drupal URI:
$file = file_load($fid);
$uri = $file->uri;
Now, you can turn this … into a URL
$url = file_create_url($uri);
file_create_url() always creates an absolute URL, either using the global $base_path that you have defined, or using the one that Drupal guessed during bootstrap …
2
votes
Accepted
How do I use .htaccess to trigger mod_rewrites before D7's Clean URLs take over?
Personally, I would see if the Redirect module works for your needs. Is it basically a UI interface for making 301 redirects. Off the top of my head, though, I don't recall if it will work with patt …
1
vote
httpd.conf clean urls issue
It is hard to tell what your exact problem is, but the default .htaccess does more than just redirect requests to index.php. It
Protects certain directories and files from being accessed
Set up saf …
5
votes
Display the full URL of the home page?
In Drupal 7, The front page is normally set via system_site_information_settings(). It is an unaliased URL, so it is best to use the API. I would do it as:
$home = url(variable_get('site_frontpage' …
8
votes
Accepted
Proper way to get the base path when including an image from a module?
Drupal core uses file_create_url() for internal images like this (eg, the default favicon.ico handling in includes/theme.inc).
This ensures that hook_file_url_alter() gets called (the CDN module does …
17
votes
Accepted
Why are tokens added to image URLs?
This was a change that was introduced in Drupal 7.20, which addressed a denial of service vulnerability:
Drupal core's Image module allows for the on-demand generation of image derivatives. This c …
2
votes
Accepted
Hiding the site domain name from the content writers
As long as you have your server configured properly (ie, have your ServerName and ServerAlias directives set right for Apache), then this should work our of the box as long as you don't explicitly set …
2
votes
Accepted
a non existing subdomain is added to image urls
This is rather big guess, but I think you have everything configured so that your virtual host is responding to all subdomains for your primary domain. In Apache terms this would be something like
S …
1
vote
Accepted
Full path in the menu
I would try the following.
Take a backup of the database. Backup and Migrate makes this easy.
Make sure core and modules are up to date, especially Pathauto and Token.
Browse to admin/config/search …
1
vote
Accepted
How can I set a response URL to use https?
The best way to handle this is when the user requests the JSON over HTTP, redirect it to HTTPS, and then the response will come back as HTTPS.
The Secure Pages module does just this. It will let you …
3
votes
Google keeps indexing /comment/reply URL
I would try adding
RewriteCond %{HTTP_USER_AGENT} ^Googlebot
RewriteRule ^comment/reply/$ - [G,L]
RewriteRule ^comment/reply/(.*) - [G,L]
to .htaccess or Apache config to inform spiders that the li …