dns – Wildcard redirects for some paths but not others in Google Domains

dns – Wildcard redirects for some paths but not others in Google Domains – Webmasters Stack Exchange

github – Wildcard redirects for paths in Google Domains

The Goal: redirect www.example.com/product/* to www.example.com/product using Google Domains

Background: I’m using github pages to host my site so I cannot add an htaccess file like a more traditional site. Also I had some issues with emails from my domain going to spam when I used Cloudflare.

There doesn’t seem to be an option to simply set up wildcard redirects for paths. it’s just subdomain.

rfc – Do glue records/child hosts override DNS wildcard entries or A records at the domain names DNS servers records?

Do glue records/child hosts override DNS wildcard entries or A records at the domain names DNS servers records?

example:
ns1.example.com = 1.1.1.1 at registrar DNS glue /child host

ns1.example.com = 2.2.2.2 wild card entry at DNS server example.com

if i ping ns1.example.com from 8.8.8.8 or external dns internet, will it go to 1.1.1.1 or 2.2.2.2?

if so which RFC states this policy?

https – How do I install a wildcard SSL certificate on WHM using Let’s Encrypt plugin and Cloudflare DNS?

I am using cPanel 92 on CentOS 7 and my domain.com’s DNS zone is running on Cloudflare (free Cloudflare tier) and I’m having trouble getting my subdomains (of a subdomain) running over HTTPS. Security isn’t important as no sensitive information is involved, but user trust is paramount so I can’t have security warnings.

I have:

  • Configured a wildcard subdomain (of a subdomain) on a user on cPanel (*.tech.domain.com)
  • Installed the Let’s Encrypt AutoSSL provider on WHM
  • Created an entry in my domain.com’s DNS zone on Cloudflare for ‘*.tech’
  • Experimented with enabling/disabling the proxy of the traffic in Cloudflare (often just leaving Cloudflare acting purely as a DNS zone)
  • Experimented with adding a page rule for *.tech.domain.com setting the SSL option to ‘Flexible’ as it is ‘Full’ by default for domain.com.

Unfortunately I haven’t once managed to get any subdomain loading without a security warning. Often, the subdomain refuses to load completely due to ‘ERR_SSL_VERSION_OR_CIPHER_MISMATCH’. Other times I’ve had it loading, but throwing a warning as it is running on a self-signed cert.

I’ve read that I may not be able to do it the above way because the active DNS zone for domain.com needs to be the one running on the server so that AutoSSL can add the appropriate verification records to the zone. I don’t fully understand if this is the case because AutoSSL seems to work for other subdomains on the server that don’t use the server’s DNS zone.

I’ve tried the ‘Generate a new SSL certificate and signing request’ three times and I’m not sure if I’m now supposed to wait to hear back from Let’s Encrypt? Apparently there is, or once was, an interface to review pending cert requests to the CA, but I don’t see such an interface anywhere to check whether or not there is anything pending.

I don’t care that much if the traffic is encrypted between Cloudflare and my server. I don’t care that much if the certificate the browser sees is a cPanel one, a Let’s Encrypt one or a Cloudflare one, I just want it to look secure for the end-user. I’m happy to manage this manually and upload a new cert (and repeat quarterly/annually) if needs be.

I’m a bit lost here as I’m not really familiar with how this all works, any advice/guidance would be appreciated.

htaccess – Rewrite wildcard rule to redirect images that works with HTTP, HTTPS and Firefox HTTPS-Only mode

There’s nothing in the directives you’ve posted that would cause this directly. Throwing a regex at this isn’t going help. The RewriteRule directive you posted redirects to http – end of. So, any “redirect” to HTTPS is coming from somewhere else.

You need to examine the HTTP request/response headers in the browser. Are you actually seeing a 3xx redirect or is the browser “upgrading” the request? Are you sending a Content-Security-Policy: upgrade-insecure-requests; HTTP response header? Or even Strict-Transport-Security header (although that is only relevant when sent over HTTPS). Have you dabbled with HSTS in the past?!

sometimes, especially with the latest Firefox

However, the fact that this appears to be intermittent and browser dependent would seem to suggest the problem is elsewhere and harder to debug.

Since the “big push” to HTTPS everywhere, it seems strange that any site would be hotlinking an HTTP image – this would cause problems if the source site is HTTPS. Maybe the source site is triggering the upgrade/redirect to HTTPS?!

However, there are some concerns with the directives as posted.

  1. There is no L flag on the RewriteRule, so processing is going to continue through the file and potentially be rewritten or redirected by later directives. In other words, there could be a conflict with other directives. However, you’ve stated that there are “no other rewrite-related directives” – so that would seem to rule out this possibility. Although it is the most likely one.

    (R=301,L)
    
  2. You’ve included the QSA flag on the RewriteRule and included a trailing ? on the substitution string (ie. /nolinks.jpg?). This is really a contradiction. The trailing ? effectively removes any query string from the original request, but the QSA flag appends it again! You would get the same result without the trailing ? and without the QSA flag, however, you do want to remove the query string. So, you should keep the trailing ? and remove the QSA flag. Or, use the QSD (Query String Discard) flag instead on Apache 2.4.

    RewriteRule show_image.php http://www.domain1.com/nolinks.jpg (QSD,R=301,L)
    
  3. You are using a 301 (permanent) redirect. This reduces the hits to your server as the redirect response should be cached by the browser. However, it also means that if a user should visit a site that is hotlinking your images and they are redirected to nolinks.jpg then they will also be redirected when they visit your site and will be unable to see your images. You would need to change this to a 302 (temporary) redirect to avoid this behaviour – but maybe that’s considered an edge case and you want to keep this “permanent”. However, a “cached redirect” could perhaps

  4. You are redirecting to HTTP and checking HTTP in the Referer header in all your conditions. Are you not using HTTPS on any of your sites?!

  5. Instead of redirecting to another image, it would be far more efficient and less resource-intensive (part of the reason for creating a hotlink protection script in the first place) if you simply block (403 Forbidden) the request instead. For example:

    RewriteRule show_image.php - (F)
    
  6. The use of RewriteCond %{HTTP_REFERER} !^$ is arguably necessary since some users might suppress the HTTP Referer and without this condition they would not be able to see your images. Although you could argue that the user knows what they are doing in this case and have made the intentioned decision that they may not see some images. However, this condition also allows a site that is hotlinking your images to set a Referrer-Policy that suppresses the Referer and overrides your hotlinking script!


UPDATE:

…caused by HTTPS-only mode which was introduced in FF 83 …. Fortunately the site is accessible by https … so the only real problem is my own .htaccess making none of the images show up. … the .htaccess rewrite rules to work whether http or https

Ah, in that case, as touched on in #4 above, you need to modify all instances of http in the RewriteCond directives to https? – the ? quantifier makes the s optional.

For example:

RewriteCond %{HTTP_REFERER} !^https?://(.+.)?domain1.com/ (NC)
RewriteCond %{HTTP_REFERER} !^https?://(.+.)?domain1.net/ (NC)
RewriteCond %{HTTP_REFERER} !^https?://(.+.)?domain1.org/ (NC)
RewriteCond %{HTTP_REFERER} !^https?://(.+.)?domain2.com/ (NC)
RewriteCond %{HTTP_REFERER} !^https?://(.+.)?domain2.net/ (NC)
RewriteCond %{HTTP_REFERER} !^https?://(.+.)?domain2.org/ (NC)
RewriteCond %{HTTP_REFERER} !^https?://(.+.)?devdomain.dev/ (NC)

Whether you change the http (to https) in the RewriteRule substitution string is really up to you (if you are not forcing HTTPS on your site)¹:

RewriteRule show_image.php https://www.domain1.com/nolinks.jpg? (R=301,L)

(NB: Just https, not https? in the substitution string.)

¹ But note that if you redirect to plain HTTP then any HTTPS site that hotlinks your image(s) – where the user is not using “HTTPS-only mode” in Fx (or similar plugin in other browsers) – will get a “mixed content” warning in their browser and the nolinks.jpg image won’t display.

Or, simply block the request (preferable from a server perspective) as mentioned in #5 above:

RewriteRule show_image.php - (F)

htaccess – Rewrite Rule With Wildcard

This set of rules causes the nolinks.jpg image to appear if anyone tries to link directly to an image from a remote site. It is working well but sometimes, especially with the latest Firefox, the browser seems to get stuck trying and keeps going to https rather than http. How can it be made to work whether https, http? I rarely use regular expressions so not sure how to apply them here.

# Block external links
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+.)?domain1.com/ (NC)
RewriteCond %{HTTP_REFERER} !^http://(.+.)?domain1.net/ (NC)
RewriteCond %{HTTP_REFERER} !^http://(.+.)?domain1.org/ (NC)
RewriteCond %{HTTP_REFERER} !^http://(.+.)?domain2.com/ (NC)
RewriteCond %{HTTP_REFERER} !^http://(.+.)?domain2.net/ (NC)
RewriteCond %{HTTP_REFERER} !^http://(.+.)?domain2.org/ (NC)
RewriteCond %{HTTP_REFERER} !^http://(.+.)?devdomain.dev/ (NC)

RewriteCond %{HTTP_REFERER} !^$
RewriteRule show_image.php http://www.domain1.com/nolinks.jpg? (R=301,QSA)

dns – Should I create a separate site in IIS to redirect (wildcard) from one domain to another?

It’s been a while since I’ve configured IIS, but if I recall correctly, the bindings will only identify that the new site is “listening” for the olddomain.com and forward to the active site, without telling your web client anything.

On the other hand, if you create a “new site” for the old domain, and use a redirect, then you will also communicate to the web client/browser that the site has been redirected (301 or 302) which will be better for your clients and for SEO in the long run. See IIS doc HTTPRedirect IIS config

linux – How do I use the wildcard into file name on az storage blob download command

Could you give me the procedure how to download the file which is included the specific word like “test” into file through az storage blob download command ? On same container, so many type of file is there, and file name is also variable. so I can sort with specific word and download only those.

az storage blob download –account-name xxx –container-name xxx –name xxxx/xxxx.log –file ~/xxx/xxxx/xxxx/test –account-key “XXXXXXXXXXXXXXXXXXXXX” –connection-string “XXXXXXXXXXXXXXXXX”

I’m not sure how to use like “grep” into az command line to sort the specific filename. I need your advice, thanks !

google search – In robots.txt, should I use a wildcard at the end of a disallow directive?

I want to disallow a specific folder and all of its files and subdirectories but I don’t know the difference between Disallow: /somedir/ and Disallow: /somedir/*. which one of these lines should I use?

By the way, what does Disallow: /somedir? mean? should I use it too?

index – Does PostgreSQL support wildcard indexes on JSON?

I have a multi-tenant service with a table like this:

project_id | user_id | user_properties

Each project belongs to a different customer and customers can freely attach metadata to their users. A project may have millions of users.

Then a customer may want to find some users inside his project filtering with the user_properties (e.g. age grater than X, favorite music equal to Y, etc.)

user_properties can be an arbitrary json of key-value pairs and a customer can run arbitrary queries on the user_properties. The json is not nested (only key-value pairs).

Since a query may return many results it would also be useful to use some sort of pagination (e.g. order by user_id + limit). But pagination, together with arbitrary filters, seems an additional issue for performance…

Is it possible to handle that case in PostgreSQL? Is EAV the only solution?

I see that MongoDB supports wildcard indexes: does PostgreSQL offer anything similar?

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123