What is the difference between a DIRECT Link and a Redirect?
I am looking at an API:
https://remoteok.io/api?ref=producthunt
And they say:
[{"legal":"By using Remote OK's API feed you legally agree to mention Remote OK as a source and link back to the job listing URL on Remote OK with a DIRECT link, no redirects please.
I am not sure what they mean by I can use a DIRECT Link but not a Redirect. Aren't they the same thing?
When linking externally (from your site to someone else's website), it's common practice to link to your own site first (so that you know how many users clicked the link) and then redirect to the external site.
Redirect would mean HTTP 301 and 302 codes.
A direct link to example.com would look like this:
example.com
An indirect link to example.com would look like this:
example.com
Related
I have asked in my post earlier what url / redirect url I should use here:
how to request auth code from Smartsheet via Postman
An user suggested me to ngrok, it gave me a temporary website when I set the http to 80. However, I noticed the forwarding website given is different every time I type
./ngrok http 80
Here are my questions:
if the forwarding website is different , how am I able to get a 'allow access' page as I don't know what app url and redirect url I should put for my Smartsheet.
I tried to request the website by typing
./ngrok http80
It gave me a forwarding , so I type the website as my app url, and /callback as the redirect url, I still don't get the 'allow access' page
the Smartsheet documentation asks me to type in the following
https://app.smartsheet.com/b/authorize?response_type=code&client_id=dheu3dmkd32fhxme&scope=READ_SHEETS%20WRITE_SHEETS&state=MY_STATE
I tried to use postman for the command above, it does not show me any error nor showing the 'allow access' page.
I am trying to get the 'allow access' page to work in my html file, but I am not sure what code I should put.
I am novice to smarsheet API, any explanation in detail will be appreciated. thank you in advance.
Looking at the ngrok docs you can set a custom subdomain each time you launch ngrok. This way you can have the same URL for repeated use.
This way you could have a command to run ngrok look like this:
ngrok http -subdomain=testsmartsheetoauth 80
Your URL would look like this:
http://testsmartsheetoauth.ngrok.io
And your callback could be set to this:
http://testsmartsheetoauth.ngrok.io/callback
This should give you the persistent URLs you need that your app could use for the OAuth flow.
I found that anybody show their page to user, then 302 redirect to my site,
I want stop it.
I thought there would be referer in request header, but didn't!
I tested this in chrome72.0.3626.121 and ie11, and use fiddler to catch Request,
there have no referer header in all request.
And my server side code can't see referer too.
How can I stop 302 redirect to my site??
It's possible these days for sites to disable adding a referrer when a user follows a link. This is a privacy feature.
The result of sites using this feature is that you can't tell if:
A) A user opened your site directly from the addressbar
B) A user came to your site from somewhere else.
If you could tell the difference, it means the privacy feature is not working. Your only option is to block anyone with no referrer header, but then you might block a lot of other users as well.
There is one other common reason for this though, if you are running an insecure (http) site and you are being linked from secure (https://) site. It might be possible to get the referrer back in this case by upgrading your site to https.
When I first started my website, I had a home/landing page and I installed my blog at myurl.com/blog. I no longer need that homepage and am wondering if there is a way to set myurl.com/blog as my homepage? So if someone types in myurl.com, it will automatically go to myurl.com/blog.
I'd like to avoid any "click here to be redirected" or "you'll be redirected in 10 seconds" type of thing.
There are likely multiple approaches, depending on your setup, but IF your setup qualifies (linux hosting etc) then a simple .htaccess permanent redirect would be the simplest approach:
# Permanent URL redirect
Redirect 301 /blog myurl.com
Is there any way to identify the url which redirected to another one?
To be clear, let's say we have example-domain.com which redirects (302) to exampledomain.com.
I thought that maybe the http_referer server variable would contain the redirecting url but thats not the case. Is that possible at all?
Wouldn't let me comment or upvote as I'm too new. Wondering if you're still having this problem - as I am too.
If you have control over both domain names, I would suggest you 302 to the URL exampledomain.com?refUrl=example-domain.com and pull the data from the querystring.
If you DON'T have control over both domain names, you are in same situation as me and my non-intentional duplicate question (3rd party is 302 redirect to my website, how to stop?)
In my case from testing, the http_referrer returns the site 'before' the site doing the 302. IE "Google (Click) Example-Domain (302) ExampleDomain"... the http referrer returns Google.
I tried to find out this, and got that http://www.google.com/ncr uses 302(or 301) redirections(not sure if it really is).
and i also got that, the server side redirections(301 and 302) will not change the original referer, i.e. if i visit http://www.google.com/ncr directly, then the request goes to google.com, but nothing in the header can show that i come from http://www.google.com/ncr.
so i wonder how google do this.
People do this very often with servlets. The servlet would detect a certain pattern and issue a redirect to a conglomerated url. A redirect is directed at the browser. It's like the browser has activated/clicked on a new link.
It is like you entered google.com/abc on the url bar and then entered google.com on the address bar after that. Due to privacy issues, the browser does not let the server know what previous URL it has visited.
Of course, if you are on the same session, going to the same site, google would have both server side and client side cookies tracking you that you just came from another google url. If were a web service provider, I Would certainly exploit knowing your browsing history.
So that, due to your browsing history www.whatever. com would redirect to different pages for different users or sessions.
Addendum:
"Due to privacy issues, the browser does not let the server know what previous URL it has visited." is not quite correct.
The more complete spec is
Clients SHOULD NOT include a Referer header field in a (non-secure) HTTP request if the referring page was transferred with a secure protocol.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html
Another reason why google forcing us to use https benefits us.
Redirect flow of non-secure http
Let's say we have
URL A has a link goto B with leads to URL B.
URL B is a redirect to URL C
The server of URL C will see the referer as URL A, not URL B. That is, the browsers will set the referer to URL A.
Redirect with cookies
I believe you should be able to include a setcookie header on a 30x redirect. I have not tried it so I do not know which browser will ignore or honour it.
BTW
I have great doubts that my answer is satisfactory for your question. I personally feel it is incomplete and I hope some one comes up with a better answer and you should choose that as the answer. In fact, I think you should unchoose this as the answer so that your question gets back into the pool of unanswered questions. Sorry.