seo – canonical URL dashboardhero.dev

For the past few days I have been trying to fix this. In fact, we had duplicate content from the site at the root, but at this moment we only have 11 html files and the js / css / img elements. We have created our site starting with a template, but it has been greatly modified and original text cannot be found on the site at this time.

Google Search Console does not provide additional information about this. Is this a problem about domains – http://www.dashboardhero.dev vs http://dashboardhero.dev – or something else?

How can I diagnose the problem further? Any tool, suggestion or comment would be greatly appreciated.

operating systems: Does the input type = "file" selection support url (upload from the web)? -html

I wonder if I can use the input type = "file" option in html to load from url (web / ftp, etc.). Is there any option? To explain more, I want to select a zip file with url and upload it to the website. What operating systems support it? How can I do it on Linux, Mac and Windows 10? I'm talking about the option in the link:

<input type="file">: How to Use This HTML Value

What is the best way to perform 4 million URL redirects 301 jpeg?

I certainly don't want to list 4 million redirects in my nginx configuration files … what is the best practice with a lot of redirects like this? They would be permanent and old links live in many historical emails from customers, so I can't count on Google et al to update their indexes over time.

I suppose I need to have a 404 configuration that verifies the requested JPG with an old URL database with its corresponding new URL?

Should an XML sitemap include redirect URL?

Do I have to include URLs that redirect in my site's XML site map?

If page X is permanently redirected to page Z, would it include page X or just page Z?

.htaccess – How to rewrite Nginx to get a clean URL of page numbers

We recently moved to Nginx from Apache,
Under Apache it used to be very easy, just put some things in .htaccess and voila.

RewriteEngine on
RewriteBase /

# only rewrite if the requested file doesn't exist
RewriteCond %{REQUEST_FILENAME} !-s

# pass the rest of the request into index.php to handle
RewriteRule ^(.*)$ /index.php/$1 (L)

The above served very well to clear the URL and let index.php handle all requests.
but in Nginx we needed to rewrite each unique URL in the location block. However, this is not & # 39; automatic & # 39; Like Apache

Few examples of our rewrite location block

location / {
try_files $uri $uri/ /index.php;
}

location /p {
rewrite ^/p(?:/((a-z_)+))?$ /index.php?p=$1 last;
rewrite ^/p/all_articles/user/(.*)?$ /index.php?p=all_articles&user=$1 last;
try_files $uri $uri/ /index.php;
}

location /about_us {
rewrite ^/about_us /index.php?about_us last;
try_files $uri $uri/ /index.php;
}

location /search {
rewrite ^/search/(.*) /index.php?search=$1;
rewrite ^/search/(.*)/page/(.*)?$ /index.php?search=$1&page=$2 last;
try_files $uri $uri/ /index.php;
}

location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

The above does a good job in clean URL, but when we need to get pages, for example

/ p / all_articles / user / ABC / page / 2

/index.php?p=all_articles&user=ABC&page=2

we have tried

rewrite ^/p/all_articles/user/(.*)/pg(?:/((0-9)+))?$ /index.php?p=all_articles&user=$1&pg=$2 last;

This only works when we place it in a separate location block

location /page/all_articles {
rewrite ^/p/all_articles/user/(.*)/pg(?:/((0-9)+))?$ /index.php?p=all_articles&user=$1&pg=$2 last;
try_files $uri $uri/ /index.php;
}

and when I did, I wouldn't leave

/ p / all_articles / user / ABC

load.

Also, search results pages would not work at all.


Another problem we found is in the folder
.htaccess

Order deny,allow
Deny from all
Options -Indexes

Under apache this would prevent any access to that folder and files, except the php script.
We tried,

location /(data|img)/ {
   deny all;
   return 404;
}

It blocks access to the folder but, if you specify the name of the file, it will continue to serve, without denying access, for example;

/data/backup_01012020.zip under apache .htaccess, only certain users were allowed to access this while they were registered. and outside of it, apache will deny any access. But under nginx, although it gives 404 when trying to access / data /. Even when you are not logged in, the backup_01012020.zip file will serve immediately.

Now we can't understand what we can do, which used to be a piece of cake with Apache. Our application is based on PHP and index.php is capable of handling all clean URL requests. It could have been great if Nginx simply passed all requests to the index and let it handle instead of many rewrites and location blocks. Any help would be great.

8 – How to get the URL of a link field in the preprocessing function

  • I have a content type event.
  • Has a link field field_event_location_link
  • Both link text and URL are optional

By default, Drupal uses the url as a title if there is no written title.

I want to show & # 39; Location & # 39; If the title is not complete.

How can I use a preprocessing function to see if there is a title and, if not, use my string?

I tried …

function my_module_preprocess_field(&$variables) {
  if ($variables('field_name') == 'field_event_location_link') {
    if ($variables('items')(0)('content')('#title') == '') {
     $variables('items')(0)('content')('#title') = 'Location';
    }
  }
}

But it doesn't work and I think it's because when I get to that point, Drupal has already used the uri for the #title.

Question:
Can I catch it before that?
Or can I get a variable for the URL and use that variable in the '' over? Should I check if something is empty …?

sharepoint online: how to save the URL created by "Get a link" using the "Move to" action

I have an SPO site with a folder for attachments (images) and a document (Word, Excel or PP) in which I linked these attachments with the "Get a link" option: when I cut and paste attachments into a different folder, These links are still working but when I use the "Move to" action in a logical application, these links stop working, when I click on SPO I cannot find the resource.

How can I solve it? Any advice?

Thanks in advance.

8 – How to access the value of the link fields (url and text) separately in the view template?

The easy way in the Views user interface adds field_link 2 times.

in 1] Exclude from the screen, Select only url and Show url as plain text.
that will only give you the url.

enter the description of the image here

in 2] Exclude from the screen and REWRITE RESULTS -> Remove HTML tags
That will only give you the title.

enter the description of the image here

Then, in a custom field, you can use the twig URL: {{field_link}} URL title: {{field_link_1}}

then in your custom template you can use them …

Option 2] almost as easy to create a custom field formatter based on
Drupal link Plugin Field FieldFormatter LinkSeparateFormatter.php

domains – Aesthetic problem of URL: the website of server 02 should look as if it were in a subdirectory of the main site of server 01

www.example.com Its on server01 with IP address 192.0.2.123

abc.example.com Its on server02 with IP address 192.0.2.21

I don't really want the subdomain abc. Ideally I want it in www.example.com/abc. I want to have a more coherent website in terms of usability and aesthetics. For non-technical people, having content in a subdirectory means that it is still in the same place compared to going to a subdomain.

My problem is that the code for the subdomain site (Site2) is activated server02 With a different IP. I can't use just 1 server for the 2 sites: Site1 is using Apache, MySql and PHP for PHP websites and static websites. Site 2 is a web application that uses nginx, ruby ​​and postgresql. As for maintenance, in my humble opinion, it is easier to have site 02 on a separate server. But as I said, it would be great if the end user can visit it in a subdirectory of the main domain.

Is there any way to achieve this?

rewrite: how could this URL work?

I have inherited a system that I am trying to reverse engineer to make modifications.

There is a program that generates a URL to listen to recordings. Does it look like this:

The URL works and I can listen to the recordings, I just don't understand HOW it works. It looks like a URL within a URL. As far as I can tell, "file" is not a link or alias in recordings.myserver.com. Certainly there is no "http://127.0.0.1" directory on the server.

This link also works:

It also makes more sense, just not what the existing program writes in the table.

There is in .htaccess:

RewriteEngine On
RewriteCond %{HTTPS}  !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 (R,L)

But keep in mind that the URL is HTTP and remains that way after any rewriting. The page containing the link that was clicked to listen to the recording only has

How can a link like the first work when there is no link or file folder? Does the http://127.0.0.1 inside the first URL make it work?