How do I make all subdomains to redirect to the domain directly in nginx? I want to redirect url's like:  to   How do I do this?
Nginx: Forward all Subdomains My code doesn't work with second level tld's like domain.co.uk Here is my conf:   # add www.   if ($host ~ ^(?!www)) {    rewrite ^/(.*)$ http://www.$host/$1 permanent;   }    # remove subdomain   if ($host ~ &quot;^www\.(.*)\.(.*\.([a-z]{2,4}|[a-z]{2}\.[a-z]{2}))&quot;) {    set $host_without_sub $2;    rewrite ^/(.*)$ http://www.$host_without_sub/$1 permanent;   }
Is there a way to block a list of specific apps on macOS?  I have looked up solutions such as Cisdem, but there are some holes in the way it works that I don't like.   Unless you also block Activity Monitor, Terminal, and System Preferences, you can simply quit the Cisdem process or create a new user to get around it. You have to block Activity Monitor, Terminal, and System Preferences to make it work well.   I want to block an app from running or even being installed on my Mac. The app can be installed via the App Store and the web. Not sure how to go about this. Enabling Parental Controls won't work as Administrator privileges are needed.   The specific app I want to block is Apple Configurator.  Any ideas? Ping is a a program owned by root with the user id bit set.  $ ls -l `which ping` -rwsr-xr-x 1 root root 35752 Nov  4  2011 /bin/ping   As I understand it, if a user runs the ping process, then the effective user id will change from the real user id (i.e. the user id of the person who launched the process) to the user id root. However when I try this and look at the output of ps to see if the ping process is running as the root user, I still get the real user id showing.  ps -e -o user,ruser,euser,cmd,args | grep ping sashan   sashan   sashan   ping -i 10 -c 1000 www.goog ping -i 10 -c 1000 www.google.com Why must a final variable be initialized before constructor completes? C# compiler error: "cannot have instance field initializers in structs" How can I reduce the file size of a scanned PDF file? I have a 72.9MB PDF file that I need to shrink into under 500KB.  The file was a JPEG image that I had scanned, and then converted to pdf. I am trying to show the current date in my JSP page using JSTL. below is the code I am using.  &lt;jsp:useBean id="now" class="java.util.Date" scope="request" /&gt; &lt;fmt:formatDate value="${now}" pattern="MM.dd.yyyy" /&gt;   But the above code is not producing any results? Am I missing anything here or is there any better approach for this? I am using JSTL 1.1. I Can't receive files via bluetooth on lxde SQL Server FOR XML Enclosing Element? What resolution should a large format artwork for print be? For wall-sized graphics and large banners (e.g. 3m × 5m), what is an acceptable PPI for print? As I understand it 300 ppi is the typical for 'small' artworks (esp. for clean text resolution). However, for small artworks, the audience usually engages at a much closer distance. Therefore, in the interests of keeping a bitmap file down to a reasonable size, can you get away with a much-reduced PPI for a large format/banner print? I am using the below script to move two days back when script runs at starting two days of the year and also check first and second days of every month and move two days back. if [$month=&quot;01&quot;] &amp;&amp; [$day=&quot;01&quot;]; then         date=&quot;$last_month/$yes_day/$last_year&quot;         fulldate=&quot;$last_month/$yes_day/$last_year&quot; else         if [$month=&quot;01&quot;] &amp;&amp; [$day=&quot;02&quot;]; then                 date=&quot;$last_month/$yes_day/$last_year&quot;                 fulldate=&quot;$last_month/$yes_day/$last_year&quot;         else                 if [ $day = &quot;01&quot; ]; then                         date=&quot;$last_month/$yes_day/$year&quot;                         fulldate=&quot;$year$last_month$yes_day&quot;                 else                         if [ $day = &quot;02&quot; ]; then                                 date=&quot;$last_month/$yes_day/$year&quot;                                 fulldate=&quot;$year$last_month$yes_day&quot;                         else                                 date=&quot;$month/$yes_day/$year&quot;                                 fulldate=&quot;$year$month$yes_day&quot;                         fi                 fi         fi fi  But my bad am getting the below error message Etime_script.sh: line 19: [06=01]: command not found Etime_script.sh: line 24: [06=01]: command not found Pluralization issue on new question statistics underneath title, with views It looks like the new question statistics underneath the question title introduced a pluralization issue with views:        To be clear here, this was not an issue with the old sidebar-based question statistics; that used to properly say "viewed 1 time". How does Newtonian mechanics explain why orbiting objects do not fall to the object they are orbiting? The force of gravity is constantly being applied to an orbiting object.  And therefore the object is constantly accelerating.  Why doesn't gravity eventually "win" over the object's momentum, like a force such as friction eventually slows down a car that runs out of gas?  I understand (I think) how relativity explains it, but how does Newtonian mechanics explain it? In Ubuntu 20.04, on the desktop, there is a number of actions I wish I could do, such as, by order of importance :  use keyboard shortcuts such as select all, copy / paste. use drag &amp; drop with icons deactivate the &quot;mouse over&quot; highlight, and restrict the clicking area to only the icon, not the surrounding square  To put it simply, I'd like to have the exact same features as offered by the desktop of Ubuntu 18.04 (probably related to a specific version of GNOME, and not Ubuntu itself). Am I missing something obvious here? I actually see no reason why those actions are removed or deactivated on the desktop, since they all work in any Nautilus window. Is there any point in taking the alternate exits in Bit Trip Runner 2?  I can't see any benefit to doing so in terms of unlocking a different path in the overworld, so is it just for your own benefit? How do I install pdfedit? Category-theoretic limit related to topological limit? How to ask great questions As programmers we are daily faced with having to get requirements, test things out, etc.  It's practically half our job to know what questions to ask, and how to ask them to get the most concise, actionable answer possible, especially from reluctant users/managers/customers/etc.  How do you ask questions that get answers? Geocoding USA addresses that cannot be sent over internet? Note: this is intended to be a canonical question about whether or not a spell or ability targets so there are multiple sub-questions.   Can Hexproof or Shroud save my creature from ? What about a  that was cast for it's Overload cost? Does shroud prevent me from using the Monstrosity ability of a creature, or from giving it more counters with Proliferate? Can I cast an Aura Enchantment on one of my creatures with Shroud, or an opponent's creature with Hexproof? Or can I use the Equip ability to attach an equipment to one of my creatures with Shroud? Will 's ability trigger when my opponent plays ? And will I have to sacrifice my  if my opponent casts ? Will Shroud or Hexproof prevent an opponent from choosing me with 's ability? Will Hexproof keep one of my creatures from being affected by ? If an Aura or Equipment is attached to a creature with Hexproof, does the Hexproof protect the attached permanent? From the beginning of the series, even during his last moments, Itachi poked Sasuke's forehead as a way of showing affection and apologizing.  But is that the only reason? Did he perhaps try to transfer some knowledge or memories to Sasuke? Or is it simply unknown?