How can I get the URL of a file’s folder in SharePoint using Power Automate?

I want to be able to pull a URL for the “containing folder” of a file I access via SharePoint using Power Automate. For instance, if I create a folder named foo and I have a document in that folder foo/foo.doc, I want the URL of the folder foo. Ideally, I’d also be able to ensure this link is shared to my organization.

Nginx invalid URL path prefix .. while sending to client

I have the following server settings which work for one URL but seem to fail on another URL.

location / {


    proxy_buffers 16 4k;
    proxy_buffer_size 2k;       


    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header X-Forwarded-Port 443;

    proxy_pass http://10.4.1.81/;


    # This is used to handle the multiple redirect 301 that the server is doing
    proxy_intercept_errors on;
    error_page 301 302 307 = @handle_redirects;     


}   

location @handle_redirects {
    set $saved_redirect_location '$upstream_http_location';
    proxy_pass $saved_redirect_location;
}   

When I go to the following URL:

https://lfdocs.mohave.gov/bos/0/doc/1652027/Page1.aspx

I get the following error from Nginx

2020/12/03 19:10:40 [error] 31251#31251: *1 invalid URL prefix in "/bos/CookieCheck.aspx?redirect=%2fbos%2fDocView.aspx%3fdbid%3d0%26id%3d1652027%26page%3d1" while sending to client, client: 10.10.82.151, server: lfdocs.mohave.gov, request: "GET /bos/0/doc/1652027/Page1.aspx HTTP/2.0", host: "lfdocs.mohave.gov"

I did some research but I can’t seem to figure it out. Any advice?

Thanks

Nailing down a definitive list of Data URL safe characters in 2020

I’m looking to find (or otherwise establish) an authoritative list of Data URL Safe characters in 2020.

I’ve found older references on the web regarding which characters may or may not be Data URL Safe, most notably this one from late 2012:

but I’m guessing it may be a little out of date given that it recommends encoding spaces and commas (?) and I’m fairly certain that these are both fairly safe to include in a Data URL today. (Although I may be wrong about this…)

Here is my current list of Data URL Safe characters:

  • A-Z
  • a-z
  • 0-9
  • .
  • ,
  • ;
  • :
  • /
  • _
  • =
  • -
  • ~
  • '
  • (space)

Are there any more Data URL Safe characters which ought to be on the list above but aren’t?

Conversely, are there any characters on the list above which really are not safe to be included in a Data URL?

How do I redirect all 404 URLs to a subdomain with same URL format using WordPress?

How do I redirect Pages from the main site with 404 Status to the Subdomain with same URL Structure?

This for example:

https://www.example.com/rent

this returns a 404 Error and must be redirected to:

http://subdomain.example.com/rent

Is this possible on WordPress? If it is how can we do it?

security – VDI Users unable to access URL

VDI users are intermittently facing access issue with an application front end URL.
Both application (URL) & the server are not behind the firewall & connected to internal network. There is no block.

For same URL Z Scaler Users are able to access seamlessly.

Can anyone tell what could be the issue here?

Squid proxy ignores squidguard rewrite url, domains and forwards to blocked url (squid 3.5)

I’ve squid 3 setup on ubuntu server (DISTRIB_RELEASE=18.04) squid proxy version: 3.5.27
with the below config.
When i try to access any url for example a porn site, which is blocked in squidGuard blocked domains/url list, but squid proxy forwards to the porn site.
I’ve enabled debug logs on squid proxy and i could see that this is allowed with the below acl.
The squid porxy never redirects the url to squidGuard,
Am i missing any config to redirect the url to squidGuard.
I’ve been on this for whole week, google played with install and uninstall and also copied the shared configs from github, i still see squid proxy never redirects to squidGuard.

Any help on this will be much appreciated.

 acl localnet src 192.168.0.0/16
 http_access allow localnet

My complete config:

acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
acl to_localnet dst 10.0.0.0/8
acl to_localnet dst 192.168.0.0/24


# standard allowed outbound ports
acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl CONNECT method CONNECT

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

acl manager proto cache_object
http_access allow localhost manager
http_access deny manager

# allow outbound if from on the Squid host
http_access allow localhost
http_access allow localnet
http_access allow to_localnet
# only allow outbound from the whitelist in /etc/squid/
#acl egress_domains dstdomain "/etc/squid/whitelist"
#http_access allow localnet egress_domains

# allow egress to an IP from the internal network

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 192.168.1.138:8888 
http_port 192.168.1.138:8889 intercept

debug_options ALL,1 33,2 33,9

# Caching patterns for squid cache objects
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|?) 0     0%      0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
# example lin deb packages
#refresh_pattern (.deb|.udeb)$   129600 100% 129600
refresh_pattern .               0       20%     4320

shutdown_lifetime 10 seconds
error_directory /usr/share/squid/errors/en/
error_default_language en

logformat squid-cs %{%Y-%m-%d %H:%M:%S}tl %3tr %>a %Ss/%03>Hs %<st %rm %>ru %un %Sh/%<a %mt "%{User-Agent}>h" "SQUID-CS" %>st %note
access_log /var/log/squid/access.log squid-cs

url_rewrite_children 20 startup=0 idle=1 concurrency=2
url_rewrite_program /usr/bin/squidGuard –c /etc/squidguard/squidGuard.conf

sample curl call to test:

   curl -I -XGET  $http_proxy https://www.freexcafe.com/

http://devappserver-api:8888
HTTP/1.1 503 Service Unavailable
Server: squid/3.5.27
Mime-Version: 1.0
Date: Wed, 02 Dec 2020 08:07:14 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 3471
X-Squid-Error: ERR_CONNECT_FAIL 111
X-Cache: MISS from devappserver-api
X-Cache-Lookup: MISS from devappserver-api:8888
Via: 1.1 devappserver-api (squid/3.5.27)
Connection: keep-alive

HTTP/1.1 200 Connection established

HTTP/2 200 
server: nginx
date: Wed, 02 Dec 2020 08:07:14 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-powered-by: PHP/7.2.34


acces.log:



Acl.cc(138) matches: checking http_access#8
2020/12/02 03:32:29.857 kid1| 28,5| Acl.cc(138) matches: checking all
2020/12/02 03:32:29.857 kid1| 28,9| Ip.cc(95) aclIpAddrNetworkCompare: aclIpAddrNetworkCompare: compare: 192.168.1.130:55336/(::) ((::):55336)  vs (::)-(::)/(::)
2020/12/02 03:32:29.857 kid1| 28,3| Ip.cc(539) match: aclIpMatchIp: '192.168.1.130:55336' found
2020/12/02 03:32:29.857 kid1| 28,3| Acl.cc(158) matches: checked: all = 1
2020/12/02 03:32:29.857 kid1| 28,3| Acl.cc(158) matches: checked: http_access#8 = 1
2020/12/02 03:32:29.857 kid1| 28,3| InnerNode.cc(97) resumeMatchingAt: checked: http_access = 1
2020/12/02 03:32:29.858 kid1| 28,3| Checklist.cc(63) markFinished: 0x55673fdd4b88 answer ALLOWED for match
2020/12/02 03:32:29.858 kid1| 28,3| Checklist.cc(163) checkCallback: ACLChecklist::checkCallback: 0x55673fdd4b88 answer=ALLOWED
2020/12/02 03:32:29.858 kid1| 28,4| FilledChecklist.cc(66) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0x55673fdd4b88
2020/12/02 03:32:29.858 kid1| 28,4| Checklist.cc(197) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0x55673fdd4b88
2020/12/02 03:32:29.858 kid1| 28,4| FilledChecklist.cc(66) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0x7ffddcf37af0
2020/12/02 03:32:29.858 kid1| 28,4| Checklist.cc(197) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0x7ffddcf37af0
2020/12/02 03:32:29.858 kid1| 28,4| FilledChecklist.cc(66) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0x7ffddcf37af0
2020/12/02 03:32:29.858 kid1| 28,4| Checklist.cc(197) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0x7ffddcf37af0
2020/12/02 03:32:29.858 kid1| 28,4| FilledChecklist.cc(66) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0x7ffddcf36fe0
2020/12/02 03:32:29.858 kid1| 28,4| Checklist.cc(197) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0x7ffddcf36fe0
2020/12/02 03:32:30.151 kid1| 33,2| client_side.cc(3370) clientReadRequest: local=192.168.1.138:8888 remote=192.168.1.130:55334 FD 11 flags=1: got flag -1; (104) Connection reset by peer
2020/12/02 03:32:30.152 kid1| 33,2| client_side.cc(832) swanSong: local=192.168.1.138:8888 remote=192.168.1.130:55336 flags=1
2020/12/02 03:32:30.152 kid1| 28,3| Checklist.cc(70) preCheck: 0x7ffddcf37d30 checking fast ACLs
2020/12/02 03:32:30.152 kid1| 28,5| Acl.cc(138) matches: checking access_log /var/log/squid/access.log
2020/12/02 03:32:30.152 kid1| 28,5| Acl.cc(138) matches: checking (access_log /var/log/squid/access.log line)
2020/12/02 03:32:30.152 kid1| 28,3| Acl.cc(158) matches: checked: (access_log /var/log/squid/access.log line) = 1
2020/12/02 03:32:30.152 kid1| 28,3| Acl.cc(158) matches: checked: access_log /var/log/squid/access.log = 1
2020/12/02 03:32:30.152 kid1| 28,3| Checklist.cc(63) markFinished: 0x7ffddcf37d30 answer ALLOWED for match
2020/12/02 03:32:30.152 kid1| 28,4| FilledChecklist.cc(66) ~ACLFilledChecklist: ACLFilledChecklist destroyed 0x7ffddcf37d30
2020/12/02 03:32:30.152 kid1| 28,4| Checklist.cc(197) ~ACLChecklist: ACLChecklist::~ACLChecklist: destroyed 0x7ffddcf37d30
2020/12/02 03:32:30.152 kid1| 33,2| client_side.cc(832) swanSong: local=192.168.1.138:8888 remote=192.168.1.130:55334 flags=1


url rewriting – Trying to find the location of a rewrite of the URL query

After my original question was deleted, I’ll try this another way.

Here’s the problem.

If I update my WordPress from 5.4 to 5.5, some pages are missing some information. I have a folder-like structure of pages (not posts) with parents and children. The site is about appartments and houses. So I have an URL like:

WP_ROOT/objects/rent/object_details/12345

These are the pages in order of their parents:

  1. WP_ROOT (like example.com)
  2. objects (is a page, parent of rent)
  3. rent (is a page, parent of object_details)
  4. object_details (is a page)
  5. 12345 is not a page! It’s just an ID (int) by which I can pull the corresponding data of the house or flat or whatever into the template.

So, in the template of object_details, I read the object_id like this:

<?php $id = str_replace( array("/objects/rent/object_details/", "/"), "", $_SERVER("SCRIPT_URI") ); ?>

So far so good. In WP 5.4 this works like a charm. In WP 5.5 it doesn’t! The object_id gets erased, so that $id in the script above becomes NULL, or “”. And in the browser I find myself in WP_ROOT/objects/rent/object_details/, so I’m redirected via 301.

Since I already got deleted once, because this `is obviously not a problem with WP but a custom tweak,´ so I’ll ask it the other way around:

How would I go about accomplishing such a thing in WP?

Maybe that way I can find out, what happened here…

magento2 – Magento 2 – remove .html from URL by using .htaccess

We have some wrong URLs in our store ending with .html. If the user opens such a URL, then the .html should get removed, otherwise the site cant get found.

So I added this rule to my .htaccess file in pub/.htaccess, i also tried the normal .htaccess in the magento root.

<IfModule mod_rewrite.c>

...

############################################
## Remove .html from end of URL

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.*).html$ /$1 (L,R=302)

</IfModule>

But if I enter a URL with .html at the end, then it is still not getting removed.

I want to make it work by using the .htaccess, otherwise I will have to create plenty of URL rewrites by hand.

rewrite rules – CPT – Nice url with add_rewrite_rule

I read lot of topick, but it don’t work. And I really don’t know what i do wrong …

I put this code the the fonction.php of my child theme :

       <?php 
function add_rewrite_url() {
    
    add_rewrite_tag( '%property_status%','((^&)+)' );
    add_rewrite_tag( '%property_city%','((^&)+)' );
    add_rewrite_tag( '%property_area%' ,'((^&)+)' );
    
    add_rewrite_rule(
    // l'URL site.com/annonce/location/nosy-be/ambatoloaka/ample-apartment/'
      'property/((^/)+)/((^/)+)/((^/)+)',
    // Devient index.php?post_type=property&region=property_status&ville=property_city&quartier=property_area
      'index.php?post_type=property&property_status=$matches(1)&property_city=$matches(2)&property_area=$matches(3)',
      'top'
    );
}
add_action( 'init', 'add_rewrite_url' ); 

I don’t dorget to update /wp-admin/options-permalink.php”

Nothink change …

any idea what I’m forgetting?

thnaks for your help !

wi fi – How to get the captive portal’s URL which I am currently connected to?

From this answer on Stack Overflow, Captive Portal is triggered only when you’re trying to make a request.

So the answer is: Open an arbitrary web page in your favorite browser, and you’ll get redirected to the Captive Portal login page.

From my own experiences, I recommend that you visit a website that does NOT use HTTPS, as encrypted connection may interfere with the redirection (Captive Portal redirection is in fact a man-in-the-middle).