sql – MySQL: Work with Alias

Is it not possible to consider the alias names defined in a query in subsequent operations?

I mean, I have to do that:

CASE WHEN tgd.generic_id = 11008 THEN 1 ELSE 0 END AS qt_sent_madison,
1 - (CASE IF tgd.generic_id = 11008 THEN 1 ELSE 0 END) AS qt_not_sent_madison,

If it were much more pleasant to do so:

CASE WHEN tgd.generic_id = 11008 THEN 1 ELSE 0 END AS qt_sent_madison,
1 - qt_sent_madison AS qt_not_sent_madison,

But when I try it, an error is thrown:

Error code: 1054. Unknown column & # 39; qt_sent_madison & # 39; in & # 39; field list & # 39;

Greetings and thanks in advance.

email – Postfix How to send emails in the name of an alias

I use Postfix as a mail relay in a very simple setup, mostly with aliases and forwarding mail to GMail.

My main goal is to minimize the need for mailboxes on my server.

Let's say I have the following alias

bob@mydomain.tld -> bob@gmail.com

I would like to forward / forward all closely mail for bob@mydomain.tld on the GMail account bob@mydomain.tld, That's the easy part.

Now for all outgoing emails sent by bob@mydomain.tld GMail offers me the possibility to send mails for another account in the settings.

howeverFor this to work, GMail must be able to log in via SMTP bob@mydomain.tldThat's just an alias.

Is there a way forward? closely Mails with an alias while they still can send Mails over SMTP / SASL?

php – Apache alias directory that only works for index pages, subpages give 404 unless the directory name is left out

So I have this weird problem. I'm trying to host a PHP codeigner project, but I can only access my index page. All other pages give me a 404 error

I want it on port 81 so in ports.conf I have added Listen to 81 (No problems, but I'll give you all the configurations I've changed for you to get an overview.)

apache2.conf

Alias ​​"/ foo" "/ var / www / foo

    Option Indexes FollowSymLinks ExecCGI
AllowOverride All
AddHandler cgi-script .php
Requires all warranty

foo.conf


    
    
    
    ServerAdmin webmaster @ localhost
DocumentRoot / var / www / team28
ErrorLog $ {APACHE_LOG_DIR} /error.log
CustomLog $ {APACHE_LOG_DIR} /access.log combined

The problem now is that I can switch to 192.168.1.101:81/foo, which shows me my index, but when I try to get to 192.168.1.101:81/foo/controller/index I get 404 but 192.168 .1.101: 81 displayed / controller / index gives me the page I'm looking for …

I'm a bit confused about what's going on, not even sure what I google or how I can find the answer I'm looking for.

I think it might have something to do with the rewrite module, no idea what it is.

This is my htacces file in the foo directory


    
    
    
    Turn on the RewriteEngine
RewriteCond% {REQUEST_FILENAME}! -F
RewriteCond% {REQUEST_FILENAME}! -D
RewriteRule ^ (. *) $ Index.php? / $ 1 [L]

If I run it locally on my machine with AMPPS, I have no problems.

postfix + rspamd: postfix does not resolve a virtual alias

I have a Postfix mail server based on Arch Linux.

I used the usual configuration: mysql virtual_ * (mailbox, alias, domain) and amavisd filtering (content_filter = smtp-amavis:[127.0.0.1]: 10024).

I would like to try the rspamd and I think I did everything right.

I am using the following settings in Postfix:

#MILTER
milter_default_action = accept
milter_protocol = 6

smtpd_milters = inet: 127.0.0.1: 8891 inet: 127.0.0.1: 11332
non_smtpd_milters = inet: 127.0.0.1: 8891
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}

rspamd local.d / worker-proxy.inc

bind_socket = "127.0.0.1:11332";
milter = yes;
Timeout = 120s;
Upstream "local" {
default = yes;
self_scan = yes;
}

If I disable the "postfix content_filter" option (no Amavis filtering), Postfix does not resolve the RCPT TO (alias envelope recipient) value with the virtual table so that redirects do not work:

If I send an email to someone@domain.hu who is a virtual alias and would be redirected to someone2@domain.hu, this recipient extension will not be executed if there is no content_filter and rspamd is based on smtpd_milters.

However, when I switch back to content_filter so that rspamd and amavis filter together, there is no problem.

The recipient extension task is theoretically performed by the Postfix cleanup process.

Otherwise rspamd works: Filter from the command line, the web interface and the milter.

I just do not understand.

seo – Use the alias domain name for multilingual websites

I would like to have versions of my website translated for specific countries. I want to use different, dedicated domain names, like:

  • www.mywebsite.com (main domain)
  • www.monsiteweb.fr (new)
  • www.misitioweb.es (new)

I want all new domains to point to the main hosting folder of the main domain, loading exactly the same index.php file. In this file, I check which domain name the user is on, and depending on that, I can retrieve the correct language from the database. This makes it easy to maintain: I use exactly the same .php files for each domain name, but just load in a different language. I will use one href long Day on all sides.

My question is: How do I set up the new domain names? Can I just set them as .com alias domains? Of course, I want all my domain names to be indexed by Google. Or does Google ignore aliases or something?

together summary: Is the setup described above the right way to do it? An alternative would be that I only buy the hosting for the new domains and copy everything, including the databases. Would this be better from the SEO point of view, or is what I had planned just as good?

18.04 – Create hotkey for an alias

My problem: I want to bind a certain cksfv Command a key to apply this command to the current folder.

So I created an alias for that cksfv Command:

Alias ​​cksfv = & # 39; cksfv -f * .sfv & # 39;

And now I want to tie this alias. I have already searched this website and found this answer. Can I use a bash alias in a keyboard shortcut?

Unfortunately the command

bash -i -c "myalias"

or in my case

bash -i -c "cksfv"

Is not there something I've missed?

macos – Unlike other folders, dragging apps from / Applications / creates an alias. What controls this behavior?

I usually install Cyberduck by using the .app bundle in the application folder on the root of my hard disk (/ Applications /). However, if I choose to move Cyberduck to my desktop, the Finder will create a new version on macOS 10.7 Lion and later alias by default, instead of actually moving .app bundle up.

When I install Cyberduck on my computer user Application folder (~ / Applications /) and later trying to pull Cyberduck on my desktop, the .app The bundle is moved like any other file.

What does it make / Applications / Folder so special? Is it possible to add the same behavior to another folder or – if SIP is disabled – to change / Applications how to behave like a normal folder?


A few things I've already tried:

  1. / Applications / belongs root: admin, However, sudo chown root: admin ~ / Applications / had no influence on the behavior when pulling.
  2. I was renamed within a test VM / Applications / to / Applications2 /, The renamed Anwendungen2 The folder has the same drag behavior as the original applications, This suggests that the behavior is not set to a particular path.

8 – Bulk update pages that use an old content type URL alias

We have a content type, Basic page Recently, the URL pattern had changed www.example.com/page/page-title to www.example.com/page-title, Under the Pathauto settings, see / admin / config / search / path / update_bulk There are options too Select the types of paths for which URL aliases should be generated This allows the selection of various elements such as content, There are still Select which URL aliases should be created where we want Update the URL alias for paths with an old URL alias as the choice.

Bulk generate path alias

We do not want to update all content Entities, but we'd rather update by content type,

How would we update ourselves? URL alias after changing the path pattern by content type?

The goal is to be able to update all base sides URL alias, but not others.

The Apache alias file was not found

I want to set up an alias in Apache like this:

http://example.com/deploy

I do that:


    
    
    
    DocumentRoot / var / www / html /
Alias ​​"/ deploy /" "/ var / www / deploy /"

        
                Requires all warranty
        

Here are the folders:

[root@asd]# ls -lisaR / var / www / deploy /
/ var / www / deploy /:
4 in total
125 0 drwxr-xr-x 2 apache apache 23 Jan 9 13:20.
8887786 0 drwxr-xr-x 5 root 47 Jan 9 13:19 ..
148408 4 -rw-r - r-- 1 apache apache 19 Jan 9 13:17 index.php
[root@asd]# 

I always get a 404 error.
The mistake says that:

Not Found The requested URL / deployment was not found on this server.